home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / animutil / fastgfx / fg303b / manuals.arj / REF.DOC next >
Encoding:
Text File  |  1993-10-02  |  264.6 KB  |  14,335 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18. Fastgraph (tm)
  19.  
  20.  
  21.  
  22.  
  23.  
  24. Reference Manual
  25.  
  26. Copyright (c) 1991-1993 by Ted Gruber Software.
  27.  
  28. All rights reserved.  No part of this publication may be reproduced, stored
  29. in a retrieval system, or transmitted by any means, electronic, mechanical,
  30. photocopying, recording, or otherwise, without express written permission
  31. from Ted Gruber Software.  The software described in this publication is
  32. furnished under a license agreement and may be used or copied only in
  33. accordance with the terms of that agreement.
  34.  
  35. This publication and its associated software are sold without warranties,
  36. either expressed or implied, regarding their merchantability or fitness for
  37. any particular application or purpose.  The information in this publication
  38. is subject to change without notice and does not represent a commitment on
  39. the part of Ted Gruber Software.  In no event shall Ted Gruber Software be
  40. liable for any loss of profit or any other commercial damage, including but
  41. not limited to special, incidental, consequential, or other damages resulting
  42. from the use of or the inability to use this product, even if Ted Gruber
  43. Software has been notified of the possibility of such damages.
  44.  
  45.  
  46. First Printing, April 1993
  47.  
  48. Fastgraph version 3.00
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. All brand and product names mentioned in this publication are trademarks or
  58. registered trademarks of their respective holders.
  59.                       T a b l e   o f   C o n t e n t s
  60.  
  61. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  62.  
  63. Fastgraph Routines by Category  . . . . . . . . . . . . . . . . . . . . .    1
  64.  
  65. Alphabetical List of Fastgraph Routines . . . . . . . . . . . . . . . . .    2
  66.      fg_allocate  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  67.      fg_alloccms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  68.      fg_allocems  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  69.      fg_allocxms  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  70.      fg_automode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  71.      fg_bestmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  72.      fg_box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   10
  73.      fg_boxdepth  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  74.      fg_boxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  75.      fg_boxx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   13
  76.      fg_boxxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  77.      fg_button  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   15
  78.      fg_capslock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   16
  79.      fg_chgattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  80.      fg_chgtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   18
  81.      fg_circle  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   19
  82.      fg_circlef . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   20
  83.      fg_circlefw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   21
  84.      fg_circlew . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   22
  85.      fg_clipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   23
  86.      fg_clpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   24
  87.      fg_clprect . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   25
  88.      fg_clprectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   26
  89.      fg_copypage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   27
  90.      fg_cursor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   28
  91.      fg_dash  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   29
  92.      fg_dashrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   30
  93.      fg_dashrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   31
  94.      fg_dashw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   32
  95.      fg_defcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   33
  96.      fg_defpages  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   34
  97.      fg_dispfile  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   35
  98.      fg_display . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   36
  99.      fg_displayp  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   38
  100.      fg_draw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   40
  101.      fg_drawmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   41
  102.      fg_drawmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
  103.      fg_drawrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   44
  104.      fg_drawrelx  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   45
  105.      fg_drawrw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   46
  106.      fg_drawrxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   47
  107.      fg_draww . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   48
  108.      fg_drawx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   49
  109.      fg_drawxw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   50
  110.      fg_drect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   51
  111.      fg_drectw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   52
  112.      fg_drwimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   53
  113.      fg_egacheck  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   54
  114.      fg_ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   55
  115.      fg_ellipsef  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   56
  116.  
  117.                                      iii
  118.      fg_ellipsew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   57
  119.      fg_ellipsfw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   58
  120.      fg_erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   59
  121.      fg_fadein  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   60
  122.      fg_fadeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   61
  123.      fg_fillpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   62
  124.      fg_flipmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   63
  125.      fg_flood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   64
  126.      fg_floodw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   65
  127.      fg_flpimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   66
  128.      fg_fontsize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   67
  129.      fg_freepage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   68
  130.      fg_getaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   69
  131.      fg_getattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   70
  132.      fg_getblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   71
  133.      fg_getchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   72
  134.      fg_getclock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   73
  135.      fg_getcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   74
  136.      fg_getdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   75
  137.      fg_getentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   76
  138.      fg_gethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   77
  139.      fg_getimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   78
  140.      fg_getindex  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   79
  141.      fg_getkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   80
  142.      fg_getlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   81
  143.      fg_getmap  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   82
  144.      fg_getmaxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   83
  145.      fg_getmaxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   84
  146.      fg_getmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   85
  147.      fg_getpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   86
  148.      fg_getpixel  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   87
  149.      fg_getrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   88
  150.      fg_getvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   89
  151.      fg_getworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   90
  152.      fg_getxjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   91
  153.      fg_getxpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   92
  154.      fg_getyjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   93
  155.      fg_getypos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   94
  156.      fg_hush  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   95
  157.      fg_hushnext  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   96
  158.      fg_imagebuf  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   97
  159.      fg_imagesiz  . . . . . . . . . . . . . . . . . . . . . . . . . . . .   98
  160.      fg_initems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   99
  161.      fg_initjoy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  100
  162.      fg_initw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  101
  163.      fg_initxms . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  102
  164.      fg_inside  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  103
  165.      fg_intjoy  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  104
  166.      fg_intkey  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  106
  167.      fg_justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  107
  168.      fg_kbinit  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  108
  169.      fg_kbtest  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  109
  170.      fg_locate  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  110
  171.      fg_makegif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  111
  172.      fg_makepcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  112
  173.      fg_makeppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  114
  174.      fg_makespr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  115
  175.  
  176.                                       iv
  177.      fg_maprgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  116
  178.      fg_measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  117
  179.      fg_memavail  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  118
  180.      fg_memory  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  119
  181.      fg_mousebut  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  120
  182.      fg_mousecur  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  121
  183.      fg_mousefin  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  122
  184.      fg_mouseini  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  123
  185.      fg_mouselim  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  124
  186.      fg_mousemov  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  125
  187.      fg_mousepos  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  126
  188.      fg_mouseptr  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  127
  189.      fg_mousespd  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  128
  190.      fg_mousevis  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  129
  191.      fg_move  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  130
  192.      fg_moverel . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  131
  193.      fg_moverw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  132
  194.      fg_movew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  133
  195.      fg_music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  134
  196.      fg_musicb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  136
  197.      fg_numlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  137
  198.      fg_pagesize  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  138
  199.      fg_paint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  139
  200.      fg_paintw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  140
  201.      fg_palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  141
  202.      fg_palettes  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  143
  203.      fg_pan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  144
  204.      fg_panw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  145
  205.      fg_pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  146
  206.      fg_pcxhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  147
  207.      fg_pcxmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  148
  208.      fg_playing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  149
  209.      fg_point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  150
  210.      fg_pointw  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  151
  211.      fg_pointx  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  152
  212.      fg_pointxw . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  153
  213.      fg_polyfill  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  154
  214.      fg_polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  155
  215.      fg_polygonw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  156
  216.      fg_polyline  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  157
  217.      fg_polyoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  158
  218.      fg_print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  159
  219.      fg_putblock  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  160
  220.      fg_putimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  161
  221.      fg_quiet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  162
  222.      fg_rect  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  163
  223.      fg_rectw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  164
  224.      fg_reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  165
  225.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  166
  226.      fg_resize  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  167
  227.      fg_restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  168
  228.      fg_restorew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  169
  229.      fg_resume  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  170
  230.      fg_revimage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  171
  231.      fg_revmask . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  172
  232.      fg_save  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  173
  233.      fg_savew . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  174
  234.  
  235.                                       v
  236.      fg_scrlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  175
  237.      fg_scroll  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  176
  238.      fg_setangle  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  177
  239.      fg_setattr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  178
  240.      fg_setcaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  179
  241.      fg_setclip . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  180
  242.      fg_setclipw  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  181
  243.      fg_setcolor  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  182
  244.      fg_setdacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  183
  245.      fg_setentry  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  184
  246.      fg_setfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  185
  247.      fg_sethpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  186
  248.      fg_setlines  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  187
  249.      fg_setmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  188
  250.      fg_setnum  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  190
  251.      fg_setpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  191
  252.      fg_setratio  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  192
  253.      fg_setrgb  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  193
  254.      fg_setsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  194
  255.      fg_setsizew  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  195
  256.      fg_setvpage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  196
  257.      fg_setworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  197
  258.      fg_showgif . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  198
  259.      fg_showpcx . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  199
  260.      fg_showppr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  201
  261.      fg_showspr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  202
  262.      fg_sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  203
  263.      fg_sounds  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  204
  264.      fg_stall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  206
  265.      fg_suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  207
  266.      fg_svgainit  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  208
  267.      fg_svgastat  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  209
  268.      fg_svgaver . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  210
  269.      fg_swchar  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  211
  270.      fg_swlength  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  212
  271.      fg_swtext  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  213
  272.      fg_tcdefine  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  214
  273.      fg_tcmask  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  215
  274.      fg_tcxfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  216
  275.      fg_testmode  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  218
  276.      fg_text  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  219
  277.      fg_transfer  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  220
  278.      fg_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  222
  279.      fg_voice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  223
  280.      fg_voices  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  225
  281.      fg_waitfor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  227
  282.      fg_waitkey . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  228
  283.      fg_waitvr  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  229
  284.      fg_where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  230
  285.      fg_xalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  231
  286.      fg_xconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  232
  287.      fg_xscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  233
  288.      fg_xworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  234
  289.      fg_yalpha  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  235
  290.      fg_yconvert  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  236
  291.      fg_yscreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  237
  292.      fg_yworld  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  238
  293.  
  294.                                       vi
  295. Introduction
  296.  
  297.      The Fastgraph Reference Manual is a companion publication to the
  298. Fastgraph User's Guide.  Whereas the latter publication is essentially a
  299. detailed tutorial about Fastgraph, the Fastgraph Reference Manual is intended
  300. as a reference for programmers familiar with the product.
  301.  
  302.      This manual has two major parts.  The first part lists the Fastgraph
  303. routines by category; each category corresponds to a chapter in the Fastgraph
  304. User's Guide.  The second part, which occupies the larger portion of this
  305. manual, gives descriptions of each Fastgraph routine in alphabetical order.
  306.  
  307.  
  308. Fastgraph Routines by Category
  309.  
  310.      This section lists the Fastgraph routines by category.  These categories
  311. parallel the chapters in the Fastgraph User's Guide.  The lists in this
  312. section are provided as a general overview of Fastgraph's capabilities.  You
  313. can find detailed information about each Fastgraph routine in the next
  314. section of this manual, and of course in the Fastgraph User's Guide.
  315.  
  316. Video Initialization Routines:  fg_automode, fg_bestmode, fg_cursor,
  317. fg_egacheck, fg_getlines, fg_getmode, fg_memory, fg_reset, fg_setlines,
  318. fg_setmode, fg_svgainit, fg_svgastat, fg_testmode.
  319.  
  320. Coordinate Routines:  fg_getmaxx, fg_getmaxy, fg_getworld, fg_initw,
  321. fg_setworld, fg_xalpha, fg_xconvert, fg_xscreen, fg_xworld, fg_yalpha,
  322. fg_yconvert, fg_yscreen, fg_yworld.
  323.  
  324. Color-Related Routines:  fg_defcolor, fg_getcolor, fg_getdacs, fg_getindex,
  325. fg_getrgb, fg_maprgb, fg_palette, fg_palettes, fg_setattr, fg_setcolor,
  326. fg_setdacs, fg_setrgb.
  327.  
  328. Fundamental Graphics Routines:  fg_box, fg_boxdepth, fg_boxw, fg_boxx,
  329. fg_boxxw, fg_circle, fg_circlef, fg_circlefw, fg_circlew, fg_clprect,
  330. fg_clprectw, fg_dash, fg_dashrel, fg_dashrw, fg_dashw, fg_draw, fg_drawrel,
  331. fg_drawrelx, fg_drawrw, fg_drawrxw, fg_draww, fg_drawx, fg_drawxw, fg_drect,
  332. fg_drectw, fg_ellipse, fg_ellipsef, fg_ellipsew, fg_ellipsfw, fg_erase,
  333. fg_fillpage, fg_flood, fg_floodw, fg_getpixel, fg_getxpos, fg_getypos,
  334. fg_inside, fg_move, fg_moverel, fg_moverw, fg_movew, fg_paint, fg_paintw,
  335. fg_point, fg_pointw, fg_pointx, fg_pointxw, fg_polyfill, fg_polygon,
  336. fg_polygonw, fg_polyline, fg_polyoff, fg_rect, fg_rectw, fg_setclip,
  337. fg_setclipw.
  338.  
  339. Character Display Routines:  fg_chgattr, fg_chgtext, fg_fontsize, fg_getattr,
  340. fg_getchar, fg_justify, fg_locate, fg_print, fg_setangle, fg_setattr,
  341. fg_setcolor, fg_setratio, fg_setsize, fg_setsizew, fg_swchar, fg_swlength,
  342. fg_swtext, fg_text, fg_where, fg_xalpha, fg_xconvert, fg_yalpha, fg_yconvert.
  343.  
  344. Video Page Management Routines:  fg_allocate, fg_alloccms, fg_allocems,
  345. fg_allocxms, fg_copypage, fg_defpages, fg_freepage, fg_getaddr, fg_getentry,
  346. fg_gethpage, fg_getpage, fg_getvpage, fg_initems, fg_initxms, fg_pagesize,
  347. fg_resize, fg_setentry, fg_sethpage, fg_setpage, fg_setvpage.
  348.  
  349. Image File Routines:  fg_dispfile, fg_imagebuf, fg_makegif, fg_makepcx,
  350. fg_makeppr, fg_makespr, fg_pattern, fg_pcxhead, fg_pcxmode, fg_showgif,
  351. fg_showpcx, fg_showppr, fg_showspr.
  352.  
  353.                                       1
  354.  
  355. Bit-Mapped Image Routines:  fg_clipmask, fg_clpimage, fg_display,
  356. fg_displayp, fg_drawmap, fg_drawmask, fg_drwimage, fg_flipmask, fg_flpimage,
  357. fg_getimage, fg_getmap, fg_imagesiz, fg_putimage, fg_revimage, fg_revmask.
  358.  
  359. Block Transfer Routines:  fg_copypage, fg_getblock, fg_putblock, fg_restore,
  360. fg_restorew, fg_save, fg_savew, fg_tcdefine, fg_tcmask, fg_tcxfer,
  361. fg_transfer.
  362.  
  363. Special Effects Routines:  fg_fadein, fg_fadeout, fg_pan, fg_panw, fg_resize,
  364. fg_scroll.
  365.  
  366. Input Routines:  fg_button, fg_capslock, fg_getkey, fg_getxjoy, fg_getyjoy,
  367. fg_initjoy, fg_intjoy, fg_intkey, fg_kbinit, fg_kbtest, fg_mousebut,
  368. fg_mousecur, fg_mousefin, fg_mouseini, fg_mouselim, fg_mousemov, fg_mousepos,
  369. fg_mouseptr, fg_mousespd, fg_mousevis, fg_numlock, fg_scrlock, fg_setcaps,
  370. fg_setnum, fg_waitkey.
  371.  
  372. Sound Routines:  fg_hush, fg_hushnext, fg_music, fg_musicb, fg_playing,
  373. fg_quiet, fg_resume, fg_sound, fg_sounds, fg_suspend, fg_voice, fg_voices.
  374.  
  375. Timing Routines:  fg_getclock, fg_measure, fg_stall, fg_waitfor.
  376.  
  377. Miscellaneous Routines:  fg_memavail, fg_setfunc, fg_svgaver, fg_version,
  378. fg_waitvr.
  379.  
  380.  
  381. Alphabetical List of Fastgraph Routines
  382.  
  383.      This section presents a detailed description of each Fastgraph routine.
  384. Once you're familiar with Fastgraph, you'll probably refer to these
  385. descriptions more often than any other section of the two Fastgraph
  386. publications.
  387.  
  388.      The information presented for each routine includes the following:
  389.  
  390.      - function prototypes or declarations for each supported language
  391.      - a description of the routine itself
  392.      - the number of parameters, their purpose, and their data types
  393.      - the meaning and data type of the routine's return value (if
  394.        any)
  395.      - information about important restrictions pertaining to the
  396.        routine
  397.      - references to similar routines, or other routines that affect
  398.        the routine
  399.      - example programs in the Fastgraph User's Guide that use the
  400.        routine
  401.  
  402.      A prototype specifies the data types of a routine's parameters and
  403. return value.  The description of each Fastgraph routine includes prototypes
  404. for C/C++, BASIC, FORTRAN, and Pascal (in that order).  For example, the
  405. prototypes for the fg_allocate routine are:
  406.  
  407.            int fg_allocate (int page_number);
  408.            function FGallocate% (page_number%)
  409.            i*2 function fg_allocate (i*2 page_number)
  410.            function fg_allocate (page_number : integer) : integer;
  411.  
  412.                                       2
  413.  
  414. The C/C++, BASIC, and Pascal prototypes use the declaration syntax for those
  415. languages.  FORTRAN does not use function prototypes, so we've created our
  416. own prototype syntax for FORTRAN.  In the FORTRAN prototypes, each parameter
  417. is preceded by one of the data type indicators listed in the following table.
  418.  
  419.                      indicator  FORTRAN data type
  420.  
  421.                        C*(*)      CHARACTER*(*)
  422.                         I*1         INTEGER*1
  423.                         I*2         INTEGER*2
  424.                         I*4         INTEGER*4
  425.                         R*8          REAL*8
  426.  
  427. Furthermore, if the routine has a return value, the prototype begins with the
  428. return value's data type indicator followed by the word function.  If the
  429. routine has no return value, the prototype begins with the word subroutine.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.                                       3
  472. fg_allocate
  473.  
  474. Prototype
  475.  
  476.    int fg_allocate (int page_number);
  477.    function FGallocate% (page_number%)
  478.    i*2 function fg_allocate (i*2 page_number)
  479.    function fg_allocate (page_number : integer) : integer;
  480.  
  481. Description
  482.  
  483.    The fg_allocate routine creates a virtual video page.  The amount of memory
  484.    required depends on the current video mode.
  485.  
  486. Parameters
  487.  
  488.    page_number is the number by which the virtual page will be referenced.  It
  489.    must be between 0 and 63.
  490.  
  491. Return value
  492.  
  493.    A status code indicating the success or failure of the virtual page
  494.    creation, as shown below.
  495.  
  496.      0 = virtual page created
  497.      1 = specified page is a physical or logical page
  498.      7 = virtual page created, but memory control blocks were destroyed
  499.      8 = insufficient memory to create the virtual page
  500.  
  501. Restrictions
  502.  
  503.    This routine has no effect if page_number references a physical video page,
  504.    a logical video page, or if used in a video mode that does not support
  505.    virtual video pages.
  506.  
  507. See also
  508.  
  509.    fg_freepage, fg_pagesize
  510.  
  511. Examples
  512.  
  513.    8-3, 8-4, 8-5, 8-6, 8-8, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5, 13-2, 13-5,
  514.    17-1
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                                       4
  531. fg_alloccms
  532.  
  533. Prototype
  534.  
  535.    int fg_alloccms (int page_number);
  536.    function FGalloccms% (page_number%)
  537.    i*2 function fg_alloccms (i*2 page_number)
  538.    function fg_alloccms (page_number : integer) : integer;
  539.  
  540. Description
  541.  
  542.    The fg_alloccms routine creates a logical page in conventional memory.  The
  543.    amount of memory required depends on the current video mode and video
  544.    buffer dimensions.
  545.  
  546. Parameters
  547.  
  548.    page_number is the number by which the logical page will be referenced.  It
  549.    must be between 1 and 63.
  550.  
  551. Return value
  552.  
  553.     0 = logical page created in conventional memory
  554.    -2 = invalid page number
  555.    -3 = page already created, or page exists as a physical or virtual page
  556.    -4 = insufficient conventional memory to create the page
  557.  
  558. Restrictions
  559.  
  560.    This routine has no effect if page_number references a physical or virtual
  561.    video page.
  562.  
  563.    The only function you can perform with logical pages is copying one entire
  564.    page to another (with fg_copypage).
  565.  
  566. See also
  567.  
  568.    fg_allocems, fg_allocxms, fg_copypage, fg_freepage, fg_pagesize
  569.  
  570. Examples
  571.  
  572.    8-9, 8-11
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.                                       5
  590. fg_allocems
  591.  
  592. Prototype
  593.  
  594.    int fg_allocems (int page_number);
  595.    function FGallocems% (page_number%)
  596.    i*2 function fg_allocems (i*2 page_number)
  597.    function fg_allocems (page_number : integer) : integer;
  598.  
  599. Description
  600.  
  601.    The fg_allocems routine creates a logical page in expanded memory (EMS).
  602.    The amount of memory required depends on the current video mode and video
  603.    buffer dimensions.
  604.  
  605. Parameters
  606.  
  607.    page_number is the number by which the logical page will be referenced.  It
  608.    must be between 1 and 63.
  609.  
  610. Return value
  611.  
  612.     0 = logical page created in expanded memory
  613.    -1 = Expanded Memory Manager not initialized
  614.    -2 = invalid page number
  615.    -3 = page already created, or page exists as a physical or virtual page
  616.    -4 = insufficient expanded memory to create the page
  617.  
  618. Restrictions
  619.  
  620.    This routine has no effect if page_number references a physical or virtual
  621.    video page.
  622.  
  623.    Before using this routine, you must use the fg_initems routine to
  624.    initialize the Expanded Memory Manager.
  625.  
  626.    The only function you can perform with EMS logical pages is copying one
  627.    entire page to another (with fg_copypage).
  628.  
  629. See also
  630.  
  631.    fg_alloccms, fg_allocxms, fg_copypage, fg_freepage, fg_initems, fg_pagesize
  632.  
  633. Examples
  634.  
  635.    8-9
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.                                       6
  649. fg_allocxms
  650.  
  651. Prototype
  652.  
  653.    int fg_allocxms (int page_number);
  654.    function FGallocxms% (page_number%)
  655.    i*2 function fg_allocxms (i*2 page_number)
  656.    function fg_allocxms (page_number : integer) : integer;
  657.  
  658. Description
  659.  
  660.    The fg_allocxms routine creates a logical page in extended memory (XMS).
  661.    The amount of memory required depends on the current video mode and video
  662.    buffer dimensions.
  663.  
  664. Parameters
  665.  
  666.    page_number is the number by which the logical page will be referenced.  It
  667.    must be between 1 and 63.
  668.  
  669. Return value
  670.  
  671.     0 = logical page created in extended memory
  672.    -1 = XMS driver not present
  673.    -2 = invalid page number
  674.    -3 = page already created, or page exists as a physical or virtual page
  675.    -4 = insufficient extended memory to create the page
  676.  
  677. Restrictions
  678.  
  679.    This routine has no effect if page_number references a physical or virtual
  680.    video page.
  681.  
  682.    Before using this routine, you must use the fg_initxms routine to
  683.    initialize the XMS driver.
  684.  
  685.    The only function you can perform with XMS logical pages is copying one
  686.    entire page to another (with fg_copypage).
  687.  
  688. See also
  689.  
  690.    fg_alloccms, fg_allocems, fg_copypage, fg_freepage, fg_initxms, fg_pagesize
  691.  
  692. Examples
  693.  
  694.    8-9
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                                       7
  708. fg_automode
  709.  
  710. Prototype
  711.  
  712.    int fg_automode (void);
  713.    function FGautomode% ()
  714.    i*2 function fg_automode ()
  715.    function fg_automode : integer;
  716.  
  717. Description
  718.  
  719.    The fg_automode routine determines the graphics video mode that offers the
  720.    most features for the user's display and adapter configuration.
  721.  
  722. Parameters
  723.  
  724.    none
  725.  
  726. Return value
  727.  
  728.    The return value is the proposed video mode number.  The current display
  729.    and adapter configuration determine the mode number, as illustrated in the
  730.    following table.
  731.  
  732.  
  733.                                  ------- display ------
  734.                        adapter   mono   RGB   ECD   VGA
  735.  
  736.                           MDA       7     0     7     7
  737.                           HGC      11     0     0    11
  738.                           CGA       0     4     0     0
  739.                           EGA      15    13    16     0
  740.                           VGA      17    17    17    18
  741.                          MCGA      17    17    17    19
  742.                         Tandy       7     9     0     0
  743.                          PCjr       7     9     0     0
  744.  
  745.  
  746.    The return value can either be passed directly to the fg_setmode routine,
  747.    or it can help determine suitable video modes for your program.
  748.  
  749. Restrictions
  750.  
  751.    For compatibility with previous versions of Fastgraph, this function does
  752.    not consider XVGA or SVGA graphics modes when proposing a video mode.
  753.  
  754. See also
  755.  
  756.    fg_bestmode, fg_setmode, fg_testmode
  757.  
  758. Examples
  759.  
  760.    3-6, 4-3
  761.  
  762.  
  763.  
  764.  
  765.  
  766.                                       8
  767. fg_bestmode
  768.  
  769. Prototype
  770.  
  771.    int fg_bestmode (int horizontal, int vertical, int pages);
  772.    function FGbestmode% (horizontal%, vertical%, pages%)
  773.    i*2 function fg_bestmode (i*2 horizontal, i*2 vertical, i*2 pages)
  774.    function fg_bestmode (horizontal, vertical, pages : integer) : integer;
  775.  
  776. Description
  777.  
  778.    The fg_bestmode routine determines the video mode having the requested
  779.    resolution and the most features for the user's display and adapter
  780.    configuration.  It is similar to fg_automode, but it excludes video modes
  781.    that do not offer the specified resolution and video page requirements.
  782.    The video pages can include physical pages, virtual pages, or both.  In
  783.    modes that support virtual pages, fg_bestmode does not check if the virtual
  784.    pages have been created, only that there is enough conventional memory
  785.    available to do so.
  786.  
  787. Parameters
  788.  
  789.    horizontal specifies the required horizontal resolution in pixels.
  790.  
  791.    vertical specifies the required vertical resolution in pixels.
  792.  
  793.    pages specifies the required number of physical or virtual video pages.
  794.  
  795. Return value
  796.  
  797.    If fg_bestmode finds a video mode that offers the specified resolution and
  798.    video page requirements, it returns the corresponding video mode number.
  799.    If not, it returns -1.
  800.  
  801. Restrictions
  802.  
  803.    SVGA graphics modes (24 to 29) are available only after successfully
  804.    initializing the SVGA kernel with fg_svgainit.
  805.  
  806. See also
  807.  
  808.    fg_automode, fg_setmode, fg_svgainit, fg_testmode
  809.  
  810. Examples
  811.  
  812.    3-4, 3-7
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.                                       9
  826. fg_box
  827.  
  828. Prototype
  829.  
  830.    void fg_box (int minx, int maxx, int miny, int maxy);
  831.    sub FGbox (minx%, maxx%, miny%, maxy%)
  832.    subroutine fg_box (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  833.    procedure fg_box (minx, maxx, miny, maxy : integer);
  834.  
  835. Description
  836.  
  837.    The fg_box routine draws an unfilled rectangle in screen space, with
  838.    respect to the clipping region.  The width of the rectangle's edges is one
  839.    pixel unless changed with the fg_boxdepth routine.
  840.  
  841. Parameters
  842.  
  843.    minx is the x coordinate of the rectangle's left edge.
  844.  
  845.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  846.    than or equal to the value of minx.
  847.  
  848.    miny is the y coordinate of the rectangle's top edge.
  849.  
  850.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  851.    greater than or equal to the value of miny.
  852.  
  853. Return value
  854.  
  855.    none
  856.  
  857. Restrictions
  858.  
  859.    This routine has no effect in text video modes.
  860.  
  861. See also
  862.  
  863.    fg_boxdepth, fg_boxw, fg_boxx, fg_rect
  864.  
  865. Examples
  866.  
  867.    6-12, 8-11, 13-7
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                                       10
  885. fg_boxdepth
  886.  
  887. Prototype
  888.  
  889.    void fg_boxdepth (int xdepth, int ydepth);
  890.    sub FGboxdepth (xdepth%, ydepth%)
  891.    subroutine fg_boxdepth (i*2 xdepth, i*2 ydepth)
  892.    procedure fg_boxdepth (xdepth, ydepth : integer);
  893.  
  894. Description
  895.  
  896.    The fg_boxdepth routine defines the depth of rectangles drawn with the box
  897.    display routines.  The fg_setmode routine initializes the box depth to one
  898.    pixel in each direction.
  899.  
  900. Parameters
  901.  
  902.    xdepth is the width in pixels of the rectangle's left and right sides.  It
  903.    must be greater than zero.
  904.  
  905.    ydepth is the height in pixels of the rectangle's top and bottom sides.  It
  906.    must be greater than zero.
  907.  
  908. Return value
  909.  
  910.    none
  911.  
  912. Restrictions
  913.  
  914.    none
  915.  
  916. See also
  917.  
  918.    fg_box, fg_boxw, fg_boxx, fg_boxxw
  919.  
  920. Examples
  921.  
  922.    6-11
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.                                       11
  944. fg_boxw
  945.  
  946. Prototype
  947.  
  948.    void fg_boxw (double xmin, double xmax, double ymin, double ymax);
  949.    sub FGboxw (xmin#, xmax#, ymin#, ymax#)
  950.    subroutine fg_boxw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  951.    procedure fg_boxw (xmin, xmax, ymin, ymax : real);
  952.  
  953. Description
  954.  
  955.    The fg_boxw routine draws an unfilled rectangle in world space, with
  956.    respect to the clipping region.  The width of the rectangle's edges is one
  957.    pixel unless changed with the fg_boxdepth routine.
  958.  
  959. Parameters
  960.  
  961.    xmin is the world space x coordinate of the rectangle's left edge.
  962.  
  963.    xmax is the world space x coordinate of the rectangle's right edge.  It
  964.    must be greater than or equal to the value of xmin.
  965.  
  966.    ymin is the world space y coordinate of the rectangle's bottom edge.
  967.  
  968.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  969.    be greater than or equal to the value of ymin.
  970.  
  971. Return value
  972.  
  973.    none
  974.  
  975. Restrictions
  976.  
  977.    This routine has no effect in text video modes and is not available in
  978.    Fastgraph/Light.
  979.  
  980. See also
  981.  
  982.    fg_box, fg_boxdepth, fg_boxxw
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.                                       12
  1003. fg_boxx
  1004.  
  1005. Prototype
  1006.  
  1007.    void fg_boxx (int minx, int maxx, int miny, int maxy);
  1008.    sub FGboxx (minx%, maxx%, miny%, maxy%)
  1009.    subroutine fg_boxx (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  1010.    procedure fg_boxx (minx, maxx, miny, maxy : integer);
  1011.  
  1012. Description
  1013.  
  1014.    The fg_boxx routine draws a hollow rectangle in "exclusive or" mode in
  1015.    screen space or character space, with respect to the clipping region.  The
  1016.    width of the rectangle's edges is one pixel unless changed with the
  1017.    fg_boxdepth routine.
  1018.  
  1019. Parameters
  1020.  
  1021.    minx is the x coordinate of the rectangle's left edge.
  1022.  
  1023.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  1024.    than or equal to the value of minx.
  1025.  
  1026.    miny is the y coordinate of the rectangle's top edge.
  1027.  
  1028.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  1029.    greater than or equal to the value of miny.
  1030.  
  1031. Return value
  1032.  
  1033.    none
  1034.  
  1035. Restrictions
  1036.  
  1037.    This routine has no effect in text video modes.
  1038.  
  1039.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1040.    is reset to its default replacement mode on return.
  1041.  
  1042. See also
  1043.  
  1044.    fg_box, fg_boxdepth, fg_boxxw
  1045.  
  1046. Examples
  1047.  
  1048.    6-13
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                                       13
  1062. fg_boxxw
  1063.  
  1064. Prototype
  1065.  
  1066.    void fg_boxxw (double xmin, double xmax, double ymin, double ymax);
  1067.    sub FGboxxw (xmin#, xmax#, ymin#, ymax#)
  1068.    subroutine fg_boxxw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  1069.    procedure fg_boxxw (xmin, xmax, ymin, ymax : real);
  1070.  
  1071. Description
  1072.  
  1073.    The fg_boxxw routine draws an unfilled rectangle in "exclusive or" mode in
  1074.    world space, with respect to the clipping region.  The width of the
  1075.    rectangle's edges is one pixel unless changed with the fg_boxdepth routine.
  1076.  
  1077. Parameters
  1078.  
  1079.    xmin is the world space x coordinate of the rectangle's left edge.
  1080.  
  1081.    xmax is the world space x coordinate of the rectangle's right edge.  It
  1082.    must be greater than or equal to the value of xmin.
  1083.  
  1084.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1085.  
  1086.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  1087.    be greater than or equal to the value of ymin.
  1088.  
  1089. Return value
  1090.  
  1091.    none
  1092.  
  1093. Restrictions
  1094.  
  1095.    This routine has no effect in text video modes and is not available in
  1096.    Fastgraph/Light.
  1097.  
  1098.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  1099.    is reset to its default replacement mode on return.
  1100.  
  1101. See also
  1102.  
  1103.    fg_boxdepth, fg_boxw, fg_boxx
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.                                       14
  1121. fg_button
  1122.  
  1123. Prototype
  1124.  
  1125.    int fg_button (int n);
  1126.    function FGbutton% (n%)
  1127.    i*2 function fg_button (i*2 n)
  1128.    function fg_button (n : integer) : integer;
  1129.  
  1130. Description
  1131.  
  1132.    The fg_button routine returns information about the state of either
  1133.    joystick's button status.
  1134.  
  1135. Parameters
  1136.  
  1137.    n specifies the joystick number, either 1 or 2.
  1138.  
  1139. Return value
  1140.  
  1141.    A status code indicating the current button status for the requested
  1142.    joystick, as shown below.
  1143.  
  1144.      0 = neither button pressed
  1145.      1 = top button pressed
  1146.      2 = bottom button pressed
  1147.      3 = top and bottom buttons pressed
  1148.  
  1149. Restrictions
  1150.  
  1151.    none
  1152.  
  1153. See also
  1154.  
  1155.    fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intjoy
  1156.  
  1157. Examples
  1158.  
  1159.    14-12
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.                                       15
  1180. fg_capslock
  1181.  
  1182. Prototype
  1183.  
  1184.    int fg_capslock (void);
  1185.    function FGcapslock% ()
  1186.    i*2 function fg_capslock ()
  1187.    function fg_capslock : integer;
  1188.  
  1189. Description
  1190.  
  1191.    The fg_capslock routine determines the state of the CapsLock key.
  1192.  
  1193. Parameters
  1194.  
  1195.    none
  1196.  
  1197. Return value
  1198.  
  1199.    If the return value is 0, it means the CapsLock key is off.  If it is 1, it
  1200.    means the CapsLock key is on.
  1201.  
  1202. Restrictions
  1203.  
  1204.    none
  1205.  
  1206. See also
  1207.  
  1208.    fg_numlock, fg_scrlock, fg_setcaps, fg_setnum
  1209.  
  1210. Examples
  1211.  
  1212.    14-3
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.                                       16
  1239. fg_chgattr
  1240.  
  1241. Prototype
  1242.  
  1243.    void fg_chgattr (int n);
  1244.    sub FGchgattr (n%)
  1245.    subroutine fg_chgattr (i*2 n)
  1246.    procedure fg_chgattr (n : integer);
  1247.  
  1248. Description
  1249.  
  1250.    The fg_chgattr routine applies the current text attribute to a given number
  1251.    of characters, starting at the text cursor position.  This routine leaves
  1252.    the text cursor one column to the right of the last character changed (or
  1253.    the first column of the next row if the last character is at the end of a
  1254.    row).
  1255.  
  1256. Parameters
  1257.  
  1258.    n is the number of characters for which to change the text attribute.
  1259.  
  1260. Return value
  1261.  
  1262.    none
  1263.  
  1264. Restrictions
  1265.  
  1266.    This routine has no effect in graphics video modes.
  1267.  
  1268. See also
  1269.  
  1270.    fg_chgtext, fg_locate, fg_text
  1271.  
  1272. Examples
  1273.  
  1274.    7-3
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.                                       17
  1298. fg_chgtext
  1299.  
  1300. Prototype
  1301.  
  1302.    void fg_chgtext (char *string, int n);
  1303.    sub FGchgtext (string$, n%)
  1304.    subroutine fg_chgtext (c*(*) string, i*2 n)
  1305.    procedure fg_chgtext (string : string; n : integer);
  1306.  
  1307. Description
  1308.  
  1309.    The fg_chgtext routine displays a string of hardware characters, starting
  1310.    at the text cursor position, using the existing text attributes.  This
  1311.    routine leaves the text cursor one column to the right of the last
  1312.    character changed (or the first column of the next row if the last
  1313.    character is at the end of a row).
  1314.  
  1315. Parameters
  1316.  
  1317.    string is the arbitrary-length sequence of characters to display.
  1318.  
  1319.    n is the number of characters in string.
  1320.  
  1321. Return value
  1322.  
  1323.    none
  1324.  
  1325. Restrictions
  1326.  
  1327.    This routine has no effect in graphics video modes.
  1328.  
  1329. See also
  1330.  
  1331.    fg_chgattr, fg_locate, fg_text
  1332.  
  1333. Examples
  1334.  
  1335.    7-3
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.                                       18
  1357. fg_circle
  1358.  
  1359. Prototype
  1360.  
  1361.    void fg_circle (int radius);
  1362.    sub FGcircle (radius%)
  1363.    subroutine fg_circle (i*2 radius)
  1364.    procedure fg_circle (radius : integer);
  1365.  
  1366. Description
  1367.  
  1368.    The fg_circle routine draws an unfilled circle in screen space.  The circle
  1369.    is centered at the current graphics cursor position.
  1370.  
  1371. Parameters
  1372.  
  1373.    radius defines the circle's radius in horizontal screen space units.  Its
  1374.    value must be greater than zero.
  1375.  
  1376. Return value
  1377.  
  1378.    none
  1379.  
  1380. Restrictions
  1381.  
  1382.    This routine has no effect in text video modes.
  1383.  
  1384. See also
  1385.  
  1386.    fg_circlef, fg_circlew, fg_ellipse
  1387.  
  1388. Examples
  1389.  
  1390.    6-10
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.                                       19
  1416. fg_circlef
  1417.  
  1418. Prototype
  1419.  
  1420.    void fg_circlef (int radius);
  1421.    sub FGcirclef (radius%)
  1422.    subroutine fg_circlef (i*2 radius)
  1423.    procedure fg_circlef (radius : integer);
  1424.  
  1425. Description
  1426.  
  1427.    The fg_circlef routine draws a filled circle in screen space.  The circle
  1428.    is centered at the current graphics cursor position and is filled with
  1429.    pixels of the current color.
  1430.  
  1431. Parameters
  1432.  
  1433.    radius defines the circle's radius in horizontal screen space units.  Its
  1434.    value must be greater than zero.
  1435.  
  1436. Return value
  1437.  
  1438.    none
  1439.  
  1440. Restrictions
  1441.  
  1442.    This routine has no effect in text video modes.
  1443.  
  1444. See also
  1445.  
  1446.    fg_circle, fg_circlefw, fg_ellipsef
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.                                       20
  1475. fg_circlefw
  1476.  
  1477. Prototype
  1478.  
  1479.    void fg_circlefw (double radius);
  1480.    sub FGcirclefw (radius#)
  1481.    subroutine fg_circlefw (r*8 radius)
  1482.    procedure fg_circlefw (radius : real);
  1483.  
  1484. Description
  1485.  
  1486.    The fg_circlefw routine draws a filled circle in world space.  The circle
  1487.    is centered at the current graphics cursor position and is filled with
  1488.    pixels of the current color.
  1489.  
  1490. Parameters
  1491.  
  1492.    radius defines the circle's radius in horizontal world space units.  Its
  1493.    value must be greater than zero.
  1494.  
  1495. Return value
  1496.  
  1497.    none
  1498.  
  1499. Restrictions
  1500.  
  1501.    This routine is not available in Fastgraph/Light and has no effect in text
  1502.    video modes.
  1503.  
  1504. See also
  1505.  
  1506.    fg_circlef, fg_circlew, fg_ellipsfw
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.                                       21
  1534. fg_circlew
  1535.  
  1536. Prototype
  1537.  
  1538.    void fg_circlew (double radius);
  1539.    sub FGcirclew (radius#)
  1540.    subroutine fg_circlew (r*8 radius)
  1541.    procedure fg_circlew (radius : real);
  1542.  
  1543. Description
  1544.  
  1545.    The fg_circlew routine draws an unfilled circle in world space.  The circle
  1546.    is centered at the current graphics cursor position.
  1547.  
  1548. Parameters
  1549.  
  1550.    radius defines the circle's radius in horizontal world space units.  Its
  1551.    value must be greater than zero.
  1552.  
  1553. Return value
  1554.  
  1555.    none
  1556.  
  1557. Restrictions
  1558.  
  1559.    This routine is not available in Fastgraph/Light and has no effect in text
  1560.    video modes.
  1561.  
  1562. See also
  1563.  
  1564.    fg_circle, fg_circlefw, fg_ellipsew
  1565.  
  1566. Examples
  1567.  
  1568.    6-9
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.                                       22
  1593. fg_clipmask
  1594.  
  1595. Prototype
  1596.  
  1597.    void fg_clipmask (char *map_array, int runs, int width);
  1598.    sub FGclipmask (map_array$, runs%, width%)
  1599.    subroutine fg_clipmask (i*1 map_array, i*2 runs, i*2 width)
  1600.    procedure fg_clipmask (var map_array : byte; runs, width : integer);
  1601.  
  1602. Description
  1603.  
  1604.    The fg_clipmask routine displays a clipped image stored as a masking map.
  1605.    The image will be positioned so that its lower left corner is at the
  1606.    graphics cursor position.  Refer to the description of the fg_drawmask
  1607.    routine for more information about masking maps.
  1608.  
  1609. Parameters
  1610.  
  1611.    map_array is the arbitrary-length array containing the masking map.
  1612.  
  1613.    runs is the number of pixel runs in the masking map.
  1614.  
  1615.    width is the width in pixels of the masking map.
  1616.  
  1617. Return value
  1618.  
  1619.    none
  1620.  
  1621. Restrictions
  1622.  
  1623.    This routine has no effect in text video modes.
  1624.  
  1625. See also
  1626.  
  1627.    fg_drawmask, fg_flipmask, fg_revmask, fg_setclip
  1628.  
  1629. Examples
  1630.  
  1631.    10-17
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.                                       23
  1652. fg_clpimage
  1653.  
  1654. Prototype
  1655.  
  1656.    void fg_clpimage (char *map_array, int width, int height);
  1657.    sub FGclpimage (map_array$, width%, height%)
  1658.    subroutine fg_clpimage (i*1 map_array, i*2 width, i*2 height)
  1659.    procedure fg_clpimage (var map_array : byte; width, height : integer);
  1660.  
  1661. Description
  1662.  
  1663.    The fg_clpimage routine displays a clipped image stored as a mode-specific
  1664.    bit map.  The image will be positioned so that its lower left corner is at
  1665.    the graphics cursor position.  Only that part of the image that falls
  1666.    within the current clipping limits will be displayed.  Refer to the
  1667.    Fastgraph User's Guide for complete information about mode-specific bit
  1668.    maps.
  1669.  
  1670. Parameters
  1671.  
  1672.    map_array is the arbitrary-length array containing the bit map.
  1673.  
  1674.    width is the width in bytes of the bit map.
  1675.  
  1676.    height is the height in bytes (pixel rows) of the bit map.
  1677.  
  1678. Return value
  1679.  
  1680.    none
  1681.  
  1682. Restrictions
  1683.  
  1684.    This routine has no effect in text video modes.
  1685.  
  1686. See also
  1687.  
  1688.    fg_drwimage, fg_flpimage, fg_getimage, fg_putimage, fg_revimage, fg_setclip
  1689.  
  1690. Examples
  1691.  
  1692.    10-8, 10-9
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                       24
  1711. fg_clprect
  1712.  
  1713. Prototype
  1714.  
  1715.    void fg_clprect (int minx, int maxx, int miny, int maxy);
  1716.    sub FGclprect (minx%, maxx%, miny%, maxy%)
  1717.    subroutine fg_clprect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  1718.    procedure fg_clprect (minx, maxx, miny, maxy : integer);
  1719.  
  1720. Description
  1721.  
  1722.    The fg_clprect routine draws a solid (filled) rectangle in screen space,
  1723.    with respect to the clipping region.
  1724.  
  1725. Parameters
  1726.  
  1727.    minx is the screen space x coordinate of the rectangle's left edge.
  1728.  
  1729.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  1730.    must be greater than or equal to the value of minx.
  1731.  
  1732.    miny is the screen space y coordinate of the rectangle's top edge.
  1733.  
  1734.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  1735.    must be greater than or equal to the value of miny.
  1736.  
  1737. Return value
  1738.  
  1739.    none
  1740.  
  1741. Restrictions
  1742.  
  1743.    This routine has no effect in text video modes.
  1744.  
  1745. See also
  1746.  
  1747.    fg_clprectw, fg_rect, fg_rectw, fg_setclip
  1748.  
  1749. Examples
  1750.  
  1751.    12-1, 12-2, 12-3, 12-4, 12-6
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.                                       25
  1770. fg_clprectw
  1771.  
  1772. Prototype
  1773.  
  1774.    void fg_clprectw (double xmin, double xmax, double ymin, double ymax);
  1775.    sub FGclprectw (xmin#, xmax#, ymin#, ymax#)
  1776.    subroutine fg_clprectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  1777.    procedure fg_clprectw (xmin, xmax, ymin, ymax : real);
  1778.  
  1779. Description
  1780.  
  1781.    The fg_clprectw routine draws a solid (filled) rectangle in world space,
  1782.    with respect to the clipping region.
  1783.  
  1784. Parameters
  1785.  
  1786.    xmin is the world space x coordinate of the rectangle's left edge.
  1787.  
  1788.    xmax is the world space x coordinate of the rectangle's right edge.  It
  1789.    must be greater than or equal to the value of xmin.
  1790.  
  1791.    ymin is the world space y coordinate of the rectangle's bottom edge.
  1792.  
  1793.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  1794.    be greater than or equal to the value of ymin.
  1795.  
  1796. Return value
  1797.  
  1798.    none
  1799.  
  1800. Restrictions
  1801.  
  1802.    This routine is not available in Fastgraph/Light and has no effect in text
  1803.    video modes.
  1804.  
  1805. See also
  1806.  
  1807.    fg_clprect, fg_rect, fg_rectw, fg_setclipw
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.                                       26
  1829. fg_copypage
  1830.  
  1831. Prototype
  1832.  
  1833.    void fg_copypage (int source_page, int dest_page);
  1834.    sub FGcopypage (source_page%, dest_page%)
  1835.    subroutine fg_copypage (i*2 source_page, i*2 dest_page)
  1836.    procedure fg_copypage (source_page, dest_page : integer);
  1837.  
  1838. Description
  1839.  
  1840.    The fg_copypage routine transfers the contents of one video page to
  1841.    another.  The pages may be physical, virtual, or logical video pages.
  1842.    Assuming maxx and maxy represent the maximum x and y coordinates of a video
  1843.    page, the call
  1844.  
  1845.      fg_copypage(source,dest);
  1846.  
  1847.    is equivalent to
  1848.  
  1849.      fg_transfer(0,maxx,0,maxy,0,maxy,source,dest);
  1850.  
  1851. Parameters
  1852.  
  1853.    source_page is the source video page number.  It must be between 0 and 63.
  1854.  
  1855.    dest_page is the destination video page number.  It must be between 0 and
  1856.    63.
  1857.  
  1858. Return value
  1859.  
  1860.    none
  1861.  
  1862. Restrictions
  1863.  
  1864.    If source_page and dest_page both reference logical pages, the pages must
  1865.    exist in the same type of memory.  For example, you cannot copy a logical
  1866.    page in extended memory to a logical page in conventional memory.
  1867.  
  1868. See also
  1869.  
  1870.    fg_alloccms, fg_allocems, fg_allocxms, fg_initems, fg_initxms, fg_transfer
  1871.  
  1872. Examples
  1873.  
  1874.    8-9, 8-11, 8-12, 11-1
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.                                       27
  1888. fg_cursor
  1889.  
  1890. Prototype
  1891.  
  1892.    void fg_cursor (int state);
  1893.    sub FGcursor (state%)
  1894.    subroutine fg_cursor (i*2 state)
  1895.    procedure fg_cursor (state : integer);
  1896.  
  1897. Description
  1898.  
  1899.    The fg_cursor routine determines the ROM BIOS cursor visibility in text
  1900.    video modes.  After calling fg_setmode, the cursor is made visible by
  1901.    default.
  1902.  
  1903. Parameters
  1904.  
  1905.    The state parameter defines the cursor visibility.  If it is 0, the cursor
  1906.    becomes invisible; if it is 1, the cursor becomes visible.
  1907.  
  1908. Return value
  1909.  
  1910.    none
  1911.  
  1912. Restrictions
  1913.  
  1914.    This routine has no effect in graphics video modes.
  1915.  
  1916. Examples
  1917.  
  1918.    3-1, 3-2, 3-3, 3-4, 3-5, 5-16, 7-1, 7-2, 7-3, 7-4, 8-3, 8-5, 8-7, 8-11,
  1919.    10-7, 10-13, 11-2, 11-4, 13-4
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.                                       28
  1947. fg_dash
  1948.  
  1949. Prototype
  1950.  
  1951.    void fg_dash (int ix, int iy, int pattern);
  1952.    sub FGdash (ix%, iy%, pattern%)
  1953.    subroutine fg_dash (i*2 ix, i*2 iy, i*2 pattern)
  1954.    procedure fg_dash (ix, iy, pattern : integer);
  1955.  
  1956. Description
  1957.  
  1958.    The fg_dash routine draws a dashed line from the graphics cursor position
  1959.    to an absolute screen space position.  It also makes the destination
  1960.    position the new graphics cursor position.
  1961.  
  1962. Parameters
  1963.  
  1964.    ix is the screen space x coordinate of the destination position.
  1965.  
  1966.    iy is the screen space y coordinate of the destination position.
  1967.  
  1968.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  1969.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  1970.    pixel being skipped.
  1971.  
  1972. Return value
  1973.  
  1974.    none
  1975.  
  1976. Restrictions
  1977.  
  1978.    This routine has no effect in text video modes.
  1979.  
  1980. See also
  1981.  
  1982.    fg_dashrel, fg_dashrw, fg_dashw, fg_move
  1983.  
  1984. Examples
  1985.  
  1986.    6-6
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.                                       29
  2006. fg_dashrel
  2007.  
  2008. Prototype
  2009.  
  2010.    void fg_dashrel (int ix, int iy, int pattern);
  2011.    sub FGdashrel (ix%, iy%, pattern%)
  2012.    subroutine fg_dashrel (i*2 ix, i*2 iy, i*2 pattern)
  2013.    procedure fg_dashrel (ix, iy, pattern : integer);
  2014.  
  2015. Description
  2016.  
  2017.    The fg_dash routine draws a dashed line from the graphics cursor position
  2018.    to a screen space position relative to it.  It also makes the destination
  2019.    position the new graphics cursor position.
  2020.  
  2021. Parameters
  2022.  
  2023.    ix is the screen space x offset of the destination position.
  2024.  
  2025.    iy is the screen space y offset of the destination position.
  2026.  
  2027.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2028.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2029.    pixel being skipped.
  2030.  
  2031. Return value
  2032.  
  2033.    none
  2034.  
  2035. Restrictions
  2036.  
  2037.    This routine has no effect in text video modes.
  2038.  
  2039. See also
  2040.  
  2041.    fg_dash, fg_dashrw, fg_dashw, fg_moverel
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.                                       30
  2065. fg_dashrw
  2066.  
  2067. Prototype
  2068.  
  2069.    void fg_dashrw (double x, double y, int pattern);
  2070.    sub FGdashrw (x#, y#, pattern%)
  2071.    subroutine fg_dashrw (r*8 x, r*8 y, i*2 pattern)
  2072.    procedure fg_dashrw (x, y : real; pattern : integer);
  2073.  
  2074. Description
  2075.  
  2076.    The fg_dashrw routine draws a dashed line from the graphics cursor position
  2077.    to a world space position relative to it.  It also makes the destination
  2078.    position the new graphics cursor position.
  2079.  
  2080. Parameters
  2081.  
  2082.    x is the world space x offset of the destination position.
  2083.  
  2084.    y is the world space y offset of the destination position.
  2085.  
  2086.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2087.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2088.    pixel being skipped.
  2089.  
  2090. Return value
  2091.  
  2092.    none
  2093.  
  2094. Restrictions
  2095.  
  2096.    This routine is not available in Fastgraph/Light and has no effect in text
  2097.    video modes.
  2098.  
  2099. See also
  2100.  
  2101.    fg_dash, fg_dashrel, fg_dashw, fg_moverw
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.                                       31
  2124. fg_dashw
  2125.  
  2126. Prototype
  2127.  
  2128.    void fg_dashw (double x, double y, int pattern);
  2129.    sub FGdashw (x#, y#, pattern%)
  2130.    subroutine fg_dashw (r*8 x, r*8 y, i*2 pattern)
  2131.    procedure fg_dashw (x, y : real; pattern : integer);
  2132.  
  2133. Description
  2134.  
  2135.    The fg_dashw routine draws a dashed line from the graphics cursor position
  2136.    to an absolute world space position.  It also makes the destination
  2137.    position the new graphics cursor position.
  2138.  
  2139. Parameters
  2140.  
  2141.    x is the world space x coordinate of the destination position.
  2142.  
  2143.    y is the world space y coordinate of the destination position.
  2144.  
  2145.    pattern is a 16-bit value representing a cyclic dash pattern.  Bits that
  2146.    are 1 will result in a pixel being drawn; bits that are 0 will result in a
  2147.    pixel being skipped.
  2148.  
  2149. Return value
  2150.  
  2151.    none
  2152.  
  2153. Restrictions
  2154.  
  2155.    This routine is not available in Fastgraph/Light and has no effect in text
  2156.    video modes.
  2157.  
  2158. See also
  2159.  
  2160.    fg_dash, fg_dashrel, fg_dashrw, fg_movew
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                                       32
  2183. fg_defcolor
  2184.  
  2185. Prototype
  2186.  
  2187.    void fg_defcolor (int index, int value);
  2188.    sub FGdefcolor (index%, value%)
  2189.    subroutine fg_defcolor (i*2 index, i*2 value)
  2190.    procedure fg_defcolor (index, value : integer);
  2191.  
  2192. Description
  2193.  
  2194.    The fg_defcolor routine assigns a color value to a virtual color index.
  2195.  
  2196. Parameters
  2197.  
  2198.    index is the virtual color index to define, between 0 and 255.
  2199.  
  2200.    value is the color value to assign to the specified color index.  It must
  2201.    be between 0 and the maximum color value for the current video mode.
  2202.  
  2203. Return value
  2204.  
  2205.    none
  2206.  
  2207. Restrictions
  2208.  
  2209.    This routine has no effect in text video modes or in 256-color graphics
  2210.    video modes.
  2211.  
  2212. See also
  2213.  
  2214.    fg_getindex, fg_palette, fg_setcolor
  2215.  
  2216. Examples
  2217.  
  2218.    5-15, 5-16
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                       33
  2242. fg_defpages
  2243.  
  2244. Prototype
  2245.  
  2246.    void fg_defpages (int source_page, int dest_page);
  2247.    sub FGdefpages (source_page%, dest_page%)
  2248.    subroutine fg_defpages (i*2 source_page, i*2 dest_page)
  2249.    procedure fg_defpages (source_page, dest_page : integer);
  2250.  
  2251. Description
  2252.  
  2253.    The fg_defpages routine defines the SVGA banks for the source and
  2254.    destination page numbers when using Fastgraph's block transfer routines
  2255.    with extended video pages.
  2256.  
  2257. Parameters
  2258.  
  2259.    source_page defines the video page from which to retrieve the block.
  2260.  
  2261.    dest_page defines the video page to which the block will be copied.
  2262.  
  2263. Return value
  2264.  
  2265.    none
  2266.  
  2267. Restrictions
  2268.  
  2269.    This routine is meaningful only in standard EGA, VGA, MCGA, and XVGA
  2270.    graphics modes (modes 13 to 23) for SVGA chipsets that support extended
  2271.    video pages.
  2272.  
  2273. See also
  2274.  
  2275.    fg_copypage, fg_restore, fg_save, fg_svgainit, fg_svgastat, fg_tcxfer,
  2276.    fg_transfer
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.                                       34
  2301. fg_dispfile
  2302.  
  2303. Prototype
  2304.  
  2305.    void fg_dispfile (char *filename, int width, int format);
  2306.    sub FGdispfile (filename$, width%, format%)
  2307.    subroutine fg_dispfile (c*(*) filename, i*2 width, i*2 format)
  2308.    procedure fg_dispfile (filename : string; width, format : integer);
  2309.  
  2310. Description
  2311.  
  2312.    The fg_dispfile routine displays an image stored in a standard or packed
  2313.    pixel run file.  The image will be positioned so that its lower left corner
  2314.    is at the graphics cursor position on the active video page.  Refer to the
  2315.    descriptions of the fg_display and fg_displayp routines for more
  2316.    information about the two pixel run formats.
  2317.  
  2318. Parameters
  2319.  
  2320.    filename is the name of the PPR or SPR file.  A device and path name may be
  2321.    included as part of the file name.  The file name must be terminated by a
  2322.    null character (that is, a zero byte).
  2323.  
  2324.    width is the width of the image in pixels.  It must be greater than zero.
  2325.  
  2326.    format specifies the image format.  The value of format must be 0 if the
  2327.    image is in standard pixel run format, and 1 if the image is in packed
  2328.    pixel run format.
  2329.  
  2330. Return value
  2331.  
  2332.    none
  2333.  
  2334. Restrictions
  2335.  
  2336.    This routine has no effect in text video modes.
  2337.  
  2338. See also
  2339.  
  2340.    fg_display, fg_displayp, fg_imagebuf, fg_pattern, fg_showppr, fg_showspr
  2341.  
  2342. Examples
  2343.  
  2344.    9-5
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.                                       35
  2360. fg_display
  2361.  
  2362. Prototype
  2363.  
  2364.    void fg_display (char *map_array, int runs, int width);
  2365.    sub FGdisplay (map_array$, runs%, width%)
  2366.    subroutine fg_display (i*1 map_array, i*2 runs, i*2 width)
  2367.    procedure fg_display (var map_array : byte; runs, width : integer);
  2368.  
  2369. Description
  2370.  
  2371.    The fg_display routine displays an image stored in Fastgraph's standard
  2372.    pixel run format, where the image resides in an array.  The image will be
  2373.    positioned so that its lower left corner is at the graphics cursor
  2374.    position.
  2375.  
  2376. Parameters
  2377.  
  2378.    map_array is the arbitrary-length array containing the pixel run map.  The
  2379.    pixel runs are represented by (color,count) pairs, as shown below.
  2380.  
  2381.  
  2382.                              [0]   color for run 1
  2383.  
  2384.                              [1]   count for run 1
  2385.  
  2386.                              [2]   color for run 2
  2387.  
  2388.                              [3]   count for run 2
  2389.                                           .
  2390.                                           .
  2391.                                           .
  2392.                                           .
  2393.                                           .
  2394.                           [2n-2]   color for run n
  2395.  
  2396.                           [2n-1]   count for run n
  2397.  
  2398.  
  2399.    Each "color" element is a value between 0 and 255 specifying the color
  2400.    index for that pixel run.  Each "count" element is a value between 0 and
  2401.    255 specifying the length in pixels of that pixel run.
  2402.  
  2403.    runs is the number of pixel runs to display from the pixel run map.  It is
  2404.    normally one-half the size of the map_array array.
  2405.  
  2406.    width is the width of the image in pixels.  It must be greater than zero.
  2407.  
  2408. Return value
  2409.  
  2410.    none
  2411.  
  2412. Restrictions
  2413.  
  2414.    This routine has no effect in text video modes.
  2415.  
  2416.  
  2417.  
  2418.                                       36
  2419. fg_display (continued)
  2420.  
  2421. See also
  2422.  
  2423.    fg_dispfile, fg_displayp, fg_pattern, fg_showspr
  2424.  
  2425. Examples
  2426.  
  2427.    10-14, 10-16
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.  
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.                                       37
  2478. fg_displayp
  2479.  
  2480. Prototype
  2481.  
  2482.    void fg_displayp (char *map_array, int runs, int width);
  2483.    sub FGdisplayp (map_array$, runs%, width%)
  2484.    subroutine fg_displayp (i*1 map_array, i*2 runs, i*2 width)
  2485.    procedure fg_displayp (var map_array : byte; runs, width : integer);
  2486.  
  2487. Description
  2488.  
  2489.    The fg_displayp routine displays an image stored in Fastgraph's packed
  2490.    pixel run format, where the image resides in an array.  The image will be
  2491.    positioned so that its lower left corner is at the graphics cursor
  2492.    position.
  2493.  
  2494. Parameters
  2495.  
  2496.    map_array is the arbitrary-length array containing the pixel run map.  The
  2497.    pixel runs are represented by (color,count) pairs, as shown below.
  2498.  
  2499.                         7                4   3                0
  2500.  
  2501.                    [0]    color for run 1     color for run 2
  2502.  
  2503.                    [1]              count for run 1
  2504.  
  2505.                    [2]              count for run 2
  2506.  
  2507.                    [3]    color for run 3     color for run 4
  2508.  
  2509.                    [4]              count for run 3
  2510.  
  2511.                    [5]              count for run 4
  2512.                                            .
  2513.                                            .
  2514.                                            .
  2515.                                            .
  2516.                                            .
  2517.               [3n/2-3]   color for run n-1    color for run n
  2518.  
  2519.               [3n/2-2]             count for run n-1
  2520.  
  2521.               [3n/2-1]              count for run n
  2522.  
  2523.  
  2524.    Each "color" element is a value between 0 and 15 specifying the color index
  2525.    for that pixel run.  Each "count" element is a value between 0 and 255
  2526.    specifying the length in pixels of that pixel run.
  2527.  
  2528.    runs is the number of pixel runs to display from the pixel run map.  It is
  2529.    normally two-thirds the size of the map_array array.
  2530.  
  2531.    width is the width of the image in pixels.  It must be greater than zero.
  2532.  
  2533.  
  2534.  
  2535.  
  2536.                                       38
  2537. fg_displayp (continued)
  2538.  
  2539. Return value
  2540.  
  2541.    none
  2542.  
  2543. Restrictions
  2544.  
  2545.    This routine has no effect in text video modes.
  2546.  
  2547. See also
  2548.  
  2549.    fg_dispfile, fg_display, fg_pattern, fg_showppr
  2550.  
  2551. Examples
  2552.  
  2553.    10-15, 10-16
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.                                       39
  2596. fg_draw
  2597.  
  2598. Prototype
  2599.  
  2600.    void fg_draw (int ix, int iy);
  2601.    sub FGdraw (ix%, iy%)
  2602.    subroutine fg_draw (i*2 ix, i*2 iy)
  2603.    procedure fg_draw (ix, iy : integer);
  2604.  
  2605. Description
  2606.  
  2607.    The fg_draw routine draws a solid line from the graphics cursor position to
  2608.    an absolute screen space position.  It also makes the destination position
  2609.    the new graphics cursor position.
  2610.  
  2611. Parameters
  2612.  
  2613.    ix is the screen space x coordinate of the destination position.
  2614.  
  2615.    iy is the screen space y coordinate of the destination position.
  2616.  
  2617. Return value
  2618.  
  2619.    none
  2620.  
  2621. Restrictions
  2622.  
  2623.    This routine has no effect in text video modes.
  2624.  
  2625. See also
  2626.  
  2627.    fg_drawrel, fg_draww, fg_drawx, fg_move
  2628.  
  2629. Examples
  2630.  
  2631.    6-2, 6-5, 13-5, 13-6
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.                                       40
  2655. fg_drawmap
  2656.  
  2657. Prototype
  2658.  
  2659.    void fg_drawmap (char *map_array, int width, int height);
  2660.    sub FGdrawmap (map_array$, width%, height%)
  2661.    subroutine fg_drawmap (i*1 map_array, i*2 width, i*2 height)
  2662.    procedure fg_drawmap (var map_array : byte; width, height : integer);
  2663.  
  2664. Description
  2665.  
  2666.    The fg_drawmap routine displays an image stored as a mode-independent bit
  2667.    map.  The image will be positioned so that its lower left corner is at the
  2668.    graphics cursor position.  Refer to the Fastgraph User's Guide for complete
  2669.    information about mode-independent bit maps.
  2670.  
  2671. Parameters
  2672.  
  2673.    map_array is the arbitrary-length array containing the bit map.  Each byte
  2674.    of map_array represents eight pixels.  Bits that are set (1) result in the
  2675.    corresponding pixel being displayed in the current color.  Bits that are
  2676.    reset (0) leave the corresponding pixel unchanged.
  2677.  
  2678.    width is the width in bytes of the bit map.
  2679.  
  2680.    height is the height in bytes (pixel rows) of the bit map.
  2681.  
  2682. Return value
  2683.  
  2684.    none
  2685.  
  2686. Restrictions
  2687.  
  2688.    none
  2689.  
  2690. See also
  2691.  
  2692.    fg_drwimage, fg_getmap
  2693.  
  2694. Examples
  2695.  
  2696.    10-1, 10-2, 10-10, 10-11
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                                       41
  2714. fg_drawmask
  2715.  
  2716. Prototype
  2717.  
  2718.    void fg_drawmask (char *map_array, int runs, int width);
  2719.    sub FGdrawmask (map_array$, runs%, width%)
  2720.    subroutine fg_drawmask (i*1 map_array, i*2 runs, i*2 width)
  2721.    procedure fg_drawmask (var map_array : byte; runs, width : integer);
  2722.  
  2723. Description
  2724.  
  2725.    The fg_drawmask routine displays an image stored as a masking map.  The
  2726.    image will be positioned so that its lower left corner is at the graphics
  2727.    cursor position.  Refer to the Fastgraph User's Guide for a complete
  2728.    discussion of masking maps.
  2729.  
  2730. Parameters
  2731.  
  2732.    map_array is the arbitrary-length array containing the masking map.  The
  2733.    masking map is a series of alternating "protect" and "zero" pixel runs, as
  2734.    shown below.
  2735.  
  2736.  
  2737.                       [1]   length of 1st protect run
  2738.  
  2739.                       [2]   length of 1st  zero   run
  2740.  
  2741.                       [3]   length of 2nd protect run
  2742.  
  2743.                       [4]   length of 2nd  zero   run
  2744.                                          .
  2745.                                          .
  2746.                                          .
  2747.                                          .
  2748.                                          .
  2749.                     [n-2]   length of final protect run
  2750.  
  2751.                     [n-1]   length of final  zero   run
  2752.  
  2753.  
  2754.    The "protect" runs protect video memory, while the "zero" runs zero video
  2755.    memory (that is, set the pixels to the background color).  The length of
  2756.    each run must be between 0 and 255.
  2757.  
  2758.    runs is the number of pixel runs in the masking map.
  2759.  
  2760.    width is the width in pixels of the masking map.
  2761.  
  2762. Return value
  2763.  
  2764.    none
  2765.  
  2766. Restrictions
  2767.  
  2768.    This routine has no effect in text video modes.
  2769.  
  2770.  
  2771.  
  2772.                                       42
  2773. fg_drawmask (continued)
  2774.  
  2775. See also
  2776.  
  2777.    fg_clipmask, fg_flipmask, fg_revmask
  2778.  
  2779. Examples
  2780.  
  2781.    10-17, 10-18
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.                                       43
  2832. fg_drawrel
  2833.  
  2834. Prototype
  2835.  
  2836.    void fg_drawrel (int ix, int iy);
  2837.    sub FGdrawrel (ix%, iy%)
  2838.    subroutine fg_drawrel (i*2 ix, i*2 iy)
  2839.    procedure fg_drawrel (ix, iy : integer);
  2840.  
  2841. Description
  2842.  
  2843.    The fg_drawrel routine draws a solid line from the graphics cursor position
  2844.    to a screen space position relative to it.  It also makes the destination
  2845.    position the new graphics cursor position.
  2846.  
  2847. Parameters
  2848.  
  2849.    ix is the screen space x offset of the destination position.
  2850.  
  2851.    iy is the screen space y offset of the destination position.
  2852.  
  2853. Return value
  2854.  
  2855.    none
  2856.  
  2857. Restrictions
  2858.  
  2859.    This routine has no effect in text video modes.
  2860.  
  2861. See also
  2862.  
  2863.    fg_draw, fg_drawrelx, fg_drawrw, fg_moverel
  2864.  
  2865. Examples
  2866.  
  2867.    6-3, 6-17
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.                                       44
  2891. fg_drawrelx
  2892.  
  2893. Prototype
  2894.  
  2895.    void fg_drawrelx (int ix, int iy);
  2896.    sub FGdrawrelx (ix%, iy%)
  2897.    subroutine fg_drawrelx (i*2 ix, i*2 iy)
  2898.    procedure fg_drawrelx (ix, iy : integer);
  2899.  
  2900. Description
  2901.  
  2902.    The fg_drawrelx routine draws a solid line in "exclusive or" mode from the
  2903.    graphics cursor position to a screen space position relative to it.  The
  2904.    destination position becomes the new graphics cursor position.
  2905.  
  2906. Parameters
  2907.  
  2908.    ix is the screen space x offset of the destination position.
  2909.  
  2910.    iy is the screen space y offset of the destination position.
  2911.  
  2912. Return value
  2913.  
  2914.    none
  2915.  
  2916. Restrictions
  2917.  
  2918.    This routine has no effect in text video modes.
  2919.  
  2920.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  2921.    is reset to its default replacement mode on return.
  2922.  
  2923. See also
  2924.  
  2925.    fg_drawrel, fg_drawrxw, fg_drawx, fg_moverel
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.  
  2940.  
  2941.  
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.  
  2949.                                       45
  2950. fg_drawrw
  2951.  
  2952. Prototype
  2953.  
  2954.    void fg_drawrw (double x, double y);
  2955.    sub FGdrawrw (x#, y#)
  2956.    subroutine fg_drawrw (r*8 x, r*8 y)
  2957.    procedure fg_drawrw (x, y : real);
  2958.  
  2959. Description
  2960.  
  2961.    The fg_drawrw routine draws a solid line from the graphics cursor position
  2962.    to a world space position relative to it.  It also makes the destination
  2963.    position the new graphics cursor position.
  2964.  
  2965. Parameters
  2966.  
  2967.    x is the world space x offset of the destination position.
  2968.  
  2969.    y is the world space y offset of the destination position.
  2970.  
  2971. Return value
  2972.  
  2973.    none
  2974.  
  2975. Restrictions
  2976.  
  2977.    This routine is not available in Fastgraph/Light and has no effect in text
  2978.    video modes.
  2979.  
  2980. See also
  2981.  
  2982.    fg_drawrel, fg_drawrxw, fg_draww, fg_moverw
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.                                       46
  3009. fg_drawrxw
  3010.  
  3011. Prototype
  3012.  
  3013.    void fg_drawrxw (double x, double y);
  3014.    sub FGdrawrxw (x#, y#)
  3015.    subroutine fg_drawrxw (r*8 x, r*8 y)
  3016.    procedure fg_drawrxw (x, y : real);
  3017.  
  3018. Description
  3019.  
  3020.    The fg_drawrxw routine draws a solid line in "exclusive or" mode from the
  3021.    graphics cursor position to a world space position relative to it.  It also
  3022.    makes the destination position the new graphics cursor position.
  3023.  
  3024. Parameters
  3025.  
  3026.    x is the world space x offset of the destination position.
  3027.  
  3028.    y is the world space y offset of the destination position.
  3029.  
  3030. Return value
  3031.  
  3032.    none
  3033.  
  3034. Restrictions
  3035.  
  3036.    This routine is not available in Fastgraph/Light and has no effect in text
  3037.    video modes.
  3038.  
  3039.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3040.    is reset to its default replacement mode on return.
  3041.  
  3042. See also
  3043.  
  3044.    fg_drawrelx, fg_drawrw, fg_drawxw, fg_moverw
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.                                       47
  3068. fg_draww
  3069.  
  3070. Prototype
  3071.  
  3072.    void fg_draww (double x, double y);
  3073.    sub FGdraww (x#, y#)
  3074.    subroutine fg_draww (r*8 x, r*8 y)
  3075.    procedure fg_draww (x, y : real);
  3076.  
  3077. Description
  3078.  
  3079.    The fg_draww routine draws a solid line from the graphics cursor position
  3080.    to an absolute world space position.  It also makes the destination
  3081.    position the new graphics cursor position.
  3082.  
  3083. Parameters
  3084.  
  3085.    x is the world space x coordinate of the destination position.
  3086.  
  3087.    y is the world space y coordinate of the destination position.
  3088.  
  3089. Return value
  3090.  
  3091.    none
  3092.  
  3093. Restrictions
  3094.  
  3095.    This routine is not available in Fastgraph/Light and has no effect in text
  3096.    video modes.
  3097.  
  3098. See also
  3099.  
  3100.    fg_draw, fg_drawrw, fg_drawxw, fg_movew
  3101.  
  3102. Examples
  3103.  
  3104.    4-3, 6-4
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.                                       48
  3127. fg_drawx
  3128.  
  3129. Prototype
  3130.  
  3131.    void fg_drawx (int ix, int iy);
  3132.    sub FGdrawx (ix%, iy%)
  3133.    subroutine fg_drawx (i*2 ix, i*2 iy)
  3134.    procedure fg_drawx (ix, iy : integer);
  3135.  
  3136. Description
  3137.  
  3138.    The fg_drawx routine draws a solid line in "exclusive or" mode from the
  3139.    graphics cursor position to an absolute screen space position.  It also
  3140.    makes the destination position the new graphics cursor position.
  3141.  
  3142. Parameters
  3143.  
  3144.    ix is the screen space x coordinate of the destination position.
  3145.  
  3146.    iy is the screen space y coordinate of the destination position.
  3147.  
  3148. Return value
  3149.  
  3150.    none
  3151.  
  3152. Restrictions
  3153.  
  3154.    This routine has no effect in text video modes.
  3155.  
  3156.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3157.    is reset to its default replacement mode on return.
  3158.  
  3159. See also
  3160.  
  3161.    fg_draw, fg_drawrelx, fg_drawxw, fg_move
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.                                       49
  3186. fg_drawxw
  3187.  
  3188. Prototype
  3189.  
  3190.    void fg_drawxw (double x, double y);
  3191.    sub FGdrawxw (x#, y#)
  3192.    subroutine fg_drawxw (r*8 x, r*8 y)
  3193.    procedure fg_drawxw (x, y : real);
  3194.  
  3195. Description
  3196.  
  3197.    The fg_drawxw routine draws a solid line in "exclusive or" mode from the
  3198.    graphics cursor position to an absolute world space position.  It also
  3199.    makes the destination position the new graphics cursor position.
  3200.  
  3201. Parameters
  3202.  
  3203.    x is the world space x coordinate of the destination position.
  3204.  
  3205.    y is the world space y coordinate of the destination position.
  3206.  
  3207. Return value
  3208.  
  3209.    none
  3210.  
  3211. Restrictions
  3212.  
  3213.    This routine is not available in Fastgraph/Light and has no effect in text
  3214.    video modes.
  3215.  
  3216.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  3217.    is reset to its default replacement mode on return.
  3218.  
  3219. See also
  3220.  
  3221.    fg_drawrxw, fg_draww, fg_drawx, fg_movew
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.                                       50
  3245. fg_drect
  3246.  
  3247. Prototype
  3248.  
  3249.    void fg_drect (int minx, int maxx, int miny, int maxy, char *matrix);
  3250.    sub FGdrect (minx%, maxx%, miny%, maxy%, matrix$)
  3251.    subroutine fg_drect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*1 matrix)
  3252.    procedure FGdrect (minx, maxx, miny, maxy : integer; var matrix : byte);
  3253.  
  3254. Description
  3255.  
  3256.    The fg_drect routine draws a dithered rectangle in screen space, without
  3257.    regard to the clipping region.
  3258.  
  3259. Parameters
  3260.  
  3261.    minx is the screen space x coordinate of the rectangle's left edge.
  3262.  
  3263.    maxx is the screen space x coordinate of the rectangle's right edge.  It
  3264.    must be greater than or equal to the value of minx.
  3265.  
  3266.    miny is the screen space y coordinate of the rectangle's top edge.
  3267.  
  3268.    maxy is the screen space y coordinate of the rectangle's bottom edge.  It
  3269.    must be greater than or equal to the value of miny.
  3270.  
  3271.    matrix is a four-element array (an eight-element array in 256-color
  3272.    graphics modes) that defines the dithering matrix.  The format of the
  3273.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3274.    User's Guide for more information.
  3275.  
  3276. Return value
  3277.  
  3278.    none
  3279.  
  3280. Restrictions
  3281.  
  3282.    This routine has no effect in text video modes.
  3283.  
  3284. See also
  3285.  
  3286.    fg_drectw, fg_rect
  3287.  
  3288. Examples
  3289.  
  3290.    6-14, 6-15, 6-16
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.                                       51
  3304. fg_drectw
  3305.  
  3306. Prototype
  3307.  
  3308.    void fg_drectw (double xmin, double xmax, double ymin, double ymax,
  3309.      char *matrix);
  3310.    sub FGdrectw (xmin#, xmax#, ymin#, ymax#, matrix$)
  3311.    subroutine fg_drectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax, i*1 matrix)
  3312.    procedure fg_drectw (xmin, xmax, ymin, ymax : real; var matrix : byte);
  3313.  
  3314. Description
  3315.  
  3316.    The fg_drectw routine draws a dithered rectangle in world space, without
  3317.    regard to the clipping region.
  3318.  
  3319. Parameters
  3320.  
  3321.    xmin is the world space x coordinate of the rectangle's left edge.
  3322.  
  3323.    xmax is the world space x coordinate of the rectangle's right edge.  It
  3324.    must be greater than or equal to the value of xmin.
  3325.  
  3326.    ymin is the world space y coordinate of the rectangle's bottom edge.
  3327.  
  3328.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  3329.    be greater than or equal to the value of ymin.
  3330.  
  3331.    matrix is a four-element array (an eight-element array in 256-color
  3332.    graphics modes) that defines the dithering matrix.  The format of the
  3333.    dithering matrix is dependent on the video mode; refer to the Fastgraph
  3334.    User's Guide for more information.
  3335.  
  3336. Return value
  3337.  
  3338.    none
  3339.  
  3340. Restrictions
  3341.  
  3342.    This routine is not available in Fastgraph/Light and has no effect in text
  3343.    video modes.
  3344.  
  3345. See also
  3346.  
  3347.    fg_drect, fg_rectw
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.                                       52
  3363. fg_drwimage
  3364.  
  3365. Prototype
  3366.  
  3367.    void fg_drwimage (char *map_array, int width, int height);
  3368.    sub FGdrwimage (map_array$, width%, height%)
  3369.    subroutine fg_drwimage (i*1 map_array, i*2 width, i*2 height)
  3370.    procedure fg_drwimage (var map_array : byte; width, height : integer);
  3371.  
  3372. Description
  3373.  
  3374.    The fg_drwimage routine displays an image stored as a mode-specific bit
  3375.    map.  The image will be positioned so that its lower left corner is at the
  3376.    graphics cursor position (or the text cursor position in text video modes).
  3377.    Refer to the Fastgraph User's Guide for complete information about mode-
  3378.    specific bit maps.
  3379.  
  3380. Parameters
  3381.  
  3382.    map_array is the arbitrary-length array containing the bit map.
  3383.  
  3384.    width is the width in bytes of the bit map.
  3385.  
  3386.    height is the height in bytes (pixel rows) of the bit map.
  3387.  
  3388. Return value
  3389.  
  3390.    none
  3391.  
  3392. Restrictions
  3393.  
  3394.    none
  3395.  
  3396. See also
  3397.  
  3398.    fg_clpimage, fg_flpimage, fg_getimage, fg_putimage, fg_revimage
  3399.  
  3400. Examples
  3401.  
  3402.    10-3, 10-4, 10-5, 10-6, 10-7, 10-8, 10-9, 10-12, 10-13, 10-18
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.                                       53
  3422. fg_egacheck
  3423.  
  3424. Prototype
  3425.  
  3426.    int fg_egacheck (void);
  3427.    function FGegacheck% ()
  3428.    i*2 function fg_egacheck ()
  3429.    function fg_egacheck : integer;
  3430.  
  3431. Description
  3432.  
  3433.    The fg_egacheck routine returns information about the active EGA adapter
  3434.    and display (or the EGA emulation capabilities of a VGA).  It is useful in
  3435.    checking if the adapter has enough memory to run a program.  This function
  3436.    remains in Fastgraph for compatibility purposes; it has been replaced by
  3437.    fg_testmode.
  3438.  
  3439. Parameters
  3440.  
  3441.    none
  3442.  
  3443. Return value
  3444.  
  3445.    The fg_egacheck routine returns a value of 0 if an EGA is not found, or if
  3446.    an EGA without an Enhanced Color Display (ECD) is detected.  Otherwise,
  3447.    fg_egacheck returns a positive integer indicating the number of 64K-byte
  3448.    increments of video memory on the EGA, as summarized below.
  3449.  
  3450.      1 = EGA with 64K video memory
  3451.      2 = EGA with 128K video memory
  3452.      3 = EGA with 192K video memory
  3453.      4 = EGA with 256K video memory
  3454.  
  3455. Restrictions
  3456.  
  3457.    none
  3458.  
  3459. See also
  3460.  
  3461.    fg_testmode
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.                                       54
  3481. fg_ellipse
  3482.  
  3483. Prototype
  3484.  
  3485.    void fg_ellipse (int horiz, int vert);
  3486.    sub FGellipse (horiz%, vert%)
  3487.    subroutine fg_ellipse (i*2 horiz, i*2 vert)
  3488.    procedure fg_ellipse (horiz, vert : integer);
  3489.  
  3490. Description
  3491.  
  3492.    The fg_ellipse routine draws an unfilled ellipse in screen space.  The
  3493.    ellipse is centered at the current graphics cursor position, and its size
  3494.    is determined by the specified lengths of its semi-axes.
  3495.  
  3496. Parameters
  3497.  
  3498.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3499.    screen space distance from the center of the ellipse to its horizontal
  3500.    extremity).
  3501.  
  3502.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3503.    space distance from the center of the ellipse to its vertical extremity).
  3504.  
  3505. Return value
  3506.  
  3507.    none
  3508.  
  3509. Restrictions
  3510.  
  3511.    This routine has no effect in text video modes.
  3512.  
  3513. See also
  3514.  
  3515.    fg_circle, fg_ellipsef, fg_ellipsew
  3516.  
  3517. Examples
  3518.  
  3519.    6-10, 12-4, 12-5, 12-6
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.                                       55
  3540. fg_ellipsef
  3541.  
  3542. Prototype
  3543.  
  3544.    void fg_ellipsef (int horiz, int vert);
  3545.    sub FGellipsef (horiz%, vert%)
  3546.    subroutine fg_ellipsef (i*2 horiz, i*2 vert)
  3547.    procedure fg_ellipsef (horiz, vert : integer);
  3548.  
  3549. Description
  3550.  
  3551.    The fg_ellipsef routine draws a filled ellipse in screen space.  The
  3552.    ellipse is centered at the current graphics cursor position, and its size
  3553.    is determined by the specified lengths of its semi-axes.  The ellipse is
  3554.    filled with pixels of the current color.
  3555.  
  3556. Parameters
  3557.  
  3558.    horiz is the length of the ellipse's horizontal semi-axis (the absolute
  3559.    screen space distance from the center of the ellipse to its horizontal
  3560.    extremity).
  3561.  
  3562.    vert is the length of the ellipse's vertical semi-axis (the absolute screen
  3563.    space distance from the center of the ellipse to its vertical extremity).
  3564.  
  3565. Return value
  3566.  
  3567.    none
  3568.  
  3569. Restrictions
  3570.  
  3571.    This routine has no effect in text video modes.
  3572.  
  3573. See also
  3574.  
  3575.    fg_circlef, fg_ellipse, fg_ellipsfw
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.                                       56
  3599. fg_ellipsew
  3600.  
  3601. Prototype
  3602.  
  3603.    void fg_ellipsew (double horiz, double vert);
  3604.    sub FGellipsew (horiz#, vert#)
  3605.    subroutine fg_ellipsew (r*8 horiz, r*8 vert)
  3606.    procedure fg_ellipsew (horiz, vert : real);
  3607.  
  3608. Description
  3609.  
  3610.    The fg_ellipsew routine draws an unfilled ellipse in world space.  The
  3611.    ellipse is centered at the current graphics cursor position, and its size
  3612.    is determined by the specified lengths of its semi-axes.
  3613.  
  3614. Parameters
  3615.  
  3616.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3617.    space distance from the center of the ellipse to its horizontal extremity).
  3618.  
  3619.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3620.    space distance from the center of the ellipse to its vertical extremity).
  3621.  
  3622. Return value
  3623.  
  3624.    none
  3625.  
  3626. Restrictions
  3627.  
  3628.    This routine is not available in Fastgraph/Light and has no effect in text
  3629.    video modes.
  3630.  
  3631. See also
  3632.  
  3633.    fg_circlew, fg_ellipse, fg_ellipsfw
  3634.  
  3635. Examples
  3636.  
  3637.    6-9
  3638.  
  3639.  
  3640.  
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.  
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.                                       57
  3658. fg_ellipsfw
  3659.  
  3660. Prototype
  3661.  
  3662.    void fg_ellipsfw (double horiz, double vert);
  3663.    sub FGellipsfw (horiz#, vert#)
  3664.    subroutine fg_ellipsfw (r*8 horiz, r*8 vert)
  3665.    procedure fg_ellipsfw (horiz, vert : real);
  3666.  
  3667. Description
  3668.  
  3669.    The fg_ellipsfw routine draws a filled ellipse in world space.  The
  3670.    ellipse is centered at the current graphics cursor position, and its size
  3671.    is determined by the specified lengths of its semi-axes.  The ellipse is
  3672.    filled with pixels of the current color.
  3673.  
  3674. Parameters
  3675.  
  3676.    horiz defines the horizontal semi-axis of the ellipse (the absolute world
  3677.    space distance from the center of the ellipse to its horizontal extremity).
  3678.  
  3679.    vert defines the vertical semi-axis of the ellipse (the absolute world
  3680.    space distance from the center of the ellipse to its vertical extremity).
  3681.  
  3682. Return value
  3683.  
  3684.    none
  3685.  
  3686. Restrictions
  3687.  
  3688.    This routine is not available in Fastgraph/Light and has no effect in text
  3689.    video modes.
  3690.  
  3691. See also
  3692.  
  3693.    fg_circlefw, fg_ellipsew
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.  
  3716.                                       58
  3717. fg_erase
  3718.  
  3719. Prototype
  3720.  
  3721.    void fg_erase (void);
  3722.    sub FGerase ()
  3723.    subroutine fg_erase ()
  3724.    procedure fg_erase;
  3725.  
  3726. Description
  3727.  
  3728.    The fg_erase routine clears the active video page.  In text modes, fg_erase
  3729.    stores a space character (ASCII 32) with a gray foreground attribute in
  3730.    each character cell.  In graphics modes, fg_erase sets each pixel to zero.
  3731.  
  3732. Parameters
  3733.  
  3734.    none
  3735.  
  3736. Return value
  3737.  
  3738.    none
  3739.  
  3740. Restrictions
  3741.  
  3742.    none
  3743.  
  3744. See also
  3745.  
  3746.    fg_fillpage, fg_reset
  3747.  
  3748. Examples
  3749.  
  3750.    4-3, 8-9, 8-10, 8-12, 9-5, 10-16, 11-1
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.                                       59
  3776. fg_fadein
  3777.  
  3778. Prototype
  3779.  
  3780.    void fg_fadein (int delay);
  3781.    sub FGfadein (delay%)
  3782.    subroutine fg_fadein (i*2 delay)
  3783.    procedure fg_fadein (delay : integer);
  3784.  
  3785. Description
  3786.  
  3787.    The fg_fadein routine replaces the visual page contents with the hidden
  3788.    page contents.  The replacement is done randomly in small sections, thus
  3789.    giving a "fade in" effect.
  3790.  
  3791. Parameters
  3792.  
  3793.    delay controls the speed at which the replacement takes place.  A value of
  3794.    zero means to perform the replacement as quickly as possible, while 1 is
  3795.    slightly slower, 2 is slower yet, and so forth.
  3796.  
  3797. Return value
  3798.  
  3799.    none
  3800.  
  3801. Restrictions
  3802.  
  3803.    This routine has no effect in text video modes.
  3804.  
  3805. See also
  3806.  
  3807.    fg_fadeout, fg_sethpage
  3808.  
  3809. Examples
  3810.  
  3811.    13-2
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.                                       60
  3835. fg_fadeout
  3836.  
  3837. Prototype
  3838.  
  3839.    void fg_fadeout (int delay);
  3840.    sub FGfadeout (delay%)
  3841.    subroutine fg_fadeout (i*2 delay)
  3842.    procedure fg_fadeout (delay : integer);
  3843.  
  3844. Description
  3845.  
  3846.    The fg_fadeout routine replaces the visual page contents with pixels of the
  3847.    current color.  The replacement is done randomly in small sections, thus
  3848.    giving a "fade out" effect.
  3849.  
  3850. Parameters
  3851.  
  3852.    delay controls the speed at which the replacement takes place.  A value of
  3853.    zero means to perform the replacement as quickly as possible, while 1 is
  3854.    slightly slower, 2 is slower yet, and so forth.
  3855.  
  3856. Return value
  3857.  
  3858.    none
  3859.  
  3860. Restrictions
  3861.  
  3862.    This routine has no effect in text video modes.
  3863.  
  3864. See also
  3865.  
  3866.    fg_fadein, fg_setcolor
  3867.  
  3868. Examples
  3869.  
  3870.    13-1
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.                                       61
  3894. fg_fillpage
  3895.  
  3896. Prototype
  3897.  
  3898.    void fg_fillpage (void);
  3899.    sub FGfillpage ()
  3900.    subroutine fg_fillpage ()
  3901.    procedure fg_fillpage;
  3902.  
  3903. Description
  3904.  
  3905.    The fg_fillpage routine fills the active video page.  In text modes, it
  3906.    stores a solid block character (ASCII 219) with the current display
  3907.    attribute in each character cell.  In graphics modes, fg_fillpage fills the
  3908.    active video page with pixels of the current color.
  3909.  
  3910. Parameters
  3911.  
  3912.    none
  3913.  
  3914. Return value
  3915.  
  3916.    none
  3917.  
  3918. Restrictions
  3919.  
  3920.    none
  3921.  
  3922. See also
  3923.  
  3924.    fg_erase, fg_setcolor, fg_setattr
  3925.  
  3926. Examples
  3927.  
  3928.    7-6, 7-8, 8-11, 10-8, 10-9
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.                                       62
  3953. fg_flipmask
  3954.  
  3955. Prototype
  3956.  
  3957.    void fg_flipmask (char *map_array, int runs, int width);
  3958.    sub FGflipmask (map_array$, runs%, width%)
  3959.    subroutine fg_flipmask (i*1 map_array, i*2 runs, i*2 width)
  3960.    procedure fg_flipmask (var map_array : byte; runs, width : integer);
  3961.  
  3962. Description
  3963.  
  3964.    The fg_flipmask routine displays a reversed clipped image stored as a
  3965.    masking map.  The image will be positioned so that its lower left corner is
  3966.    at the graphics cursor position.  Refer to the description of the
  3967.    fg_drawmask routine for more information about masking maps.
  3968.  
  3969. Parameters
  3970.  
  3971.    map_array is the arbitrary-length array containing the masking map.
  3972.  
  3973.    runs is the number of pixel runs in the masking map.
  3974.  
  3975.    width is the width in pixels of the masking map.
  3976.  
  3977. Return value
  3978.  
  3979.    none
  3980.  
  3981. Restrictions
  3982.  
  3983.    This routine has no effect in text video modes.
  3984.  
  3985. See also
  3986.  
  3987.    fg_clipmask, fg_drawmask, fg_revmask, fg_setclip
  3988.  
  3989. Examples
  3990.  
  3991.    10-17
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.                                       63
  4012. fg_flood
  4013.  
  4014. Prototype
  4015.  
  4016.    void fg_flood (int ix, int iy);
  4017.    sub FGflood (ix%, iy%)
  4018.    subroutine fg_flood (i*2 ix, i*2 iy)
  4019.    procedure fg_flood (ix, iy : integer);
  4020.  
  4021. Description
  4022.  
  4023.    The fg_flood routine fills an arbitrary closed region with the current
  4024.    color value, with respect to the current clipping limits.  The region is
  4025.    defined by specifying a screen space point within its interior.
  4026.  
  4027. Parameters
  4028.  
  4029.    ix is the screen space x coordinate of the interior point.
  4030.  
  4031.    iy is the screen space y coordinate of the interior point.
  4032.  
  4033. Return value
  4034.  
  4035.    none
  4036.  
  4037. Restrictions
  4038.  
  4039.    This routine has no effect in text video modes.
  4040.  
  4041. See also
  4042.  
  4043.    fg_floodw, fg_paint
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.                                       64
  4071. fg_floodw
  4072.  
  4073. Prototype
  4074.  
  4075.    void fg_floodw (double x, double y);
  4076.    sub FGfloodw (x#, y#)
  4077.    subroutine fg_floodw (r*8 x, r*8 y)
  4078.    procedure fg_floodw (x, y : real);
  4079.  
  4080. Description
  4081.  
  4082.    The fg_floodw routine fills an arbitrary closed region with the current
  4083.    color value, with respect to the current clipping limits.  The region is
  4084.    defined by specifying a world space point within its interior.
  4085.  
  4086. Parameters
  4087.  
  4088.    x is the world space x coordinate of the interior point.
  4089.  
  4090.    y is the world space y coordinate of the interior point.
  4091.  
  4092. Return value
  4093.  
  4094.    none
  4095.  
  4096. Restrictions
  4097.  
  4098.    This routine is not available in Fastgraph/Light and has no effect in text
  4099.    video modes.
  4100.  
  4101. See also
  4102.  
  4103.    fg_flood, fg_paintw
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.                                       65
  4130. fg_flpimage
  4131.  
  4132. Prototype
  4133.  
  4134.    void fg_flpimage (char *map_array, int width, int height);
  4135.    sub FGflpimage (map_array$, width%, height%)
  4136.    subroutine fg_flpimage (i*1 map_array, i*2 width, i*2 height)
  4137.    procedure fg_flpimage (var map_array : byte; width, height : integer);
  4138.  
  4139. Description
  4140.  
  4141.    The fg_flpimage routine displays a reversed clipped image stored as a mode-
  4142.    specific bit map.  The image will be positioned so that its lower left
  4143.    corner is at the graphics cursor position.  Only that part of the image
  4144.    that falls within the current clipping limits will be displayed.  Refer to
  4145.    the Fastgraph User's Guide for complete information about mode-specific bit
  4146.    maps.
  4147.  
  4148. Parameters
  4149.  
  4150.    map_array is the arbitrary-length array containing the bit map.
  4151.  
  4152.    width is the width in bytes of the bit map.
  4153.  
  4154.    height is the height in bytes (pixel rows) of the bit map.
  4155.  
  4156. Return value
  4157.  
  4158.    none
  4159.  
  4160. Restrictions
  4161.  
  4162.    This routine has no effect in text video modes.
  4163.  
  4164. See also
  4165.  
  4166.    fg_clpimage, fg_drwimage, fg_getimage, fg_putimage, fg_revimage, fg_setclip
  4167.  
  4168. Examples
  4169.  
  4170.    10-8, 10-9
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.                                       66
  4189. fg_fontsize
  4190.  
  4191. Prototype
  4192.  
  4193.    void fg_fontsize (int char_height);
  4194.    sub FGfontsize (char_height%)
  4195.    subroutine fg_fontsize (i*2 char_height)
  4196.    procedure fg_fontsize (char_height : integer);
  4197.  
  4198. Description
  4199.  
  4200.    The fg_fontsize routine enables the 8x8, 8x14, or 8x16 ROM BIOS character
  4201.    font for strings displayed with fg_print and fg_text.  Refer to Chapter 7
  4202.    of the Fastgraph User's Guide for information about the default character
  4203.    sizes and number of text rows available in each video mode.
  4204.  
  4205. Parameters
  4206.  
  4207.    char_height is the desired character height in pixels.  Its value must be
  4208.    8, 14, or 16.
  4209.  
  4210. Return value
  4211.  
  4212.    none
  4213.  
  4214. Restrictions
  4215.  
  4216.    If char_height is not a valid value, fg_fontsize does nothing.
  4217.  
  4218.    This routine is meaningful only in VGA and SVGA graphics video modes.
  4219.  
  4220. See also
  4221.  
  4222.    fg_print, fg_text
  4223.  
  4224. Examples
  4225.  
  4226.    7-8
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.                                       67
  4248. fg_freepage
  4249.  
  4250. Prototype
  4251.  
  4252.    int fg_freepage (int page_number);
  4253.    function FGfreepage% (page_number%)
  4254.    i*2 function fg_freepage (i*2 page_number)
  4255.    function fg_freepage (page_number : integer) : integer;
  4256.  
  4257. Description
  4258.  
  4259.    The fg_freepage routine releases a virtual or logical video page created
  4260.    with the fg_allocate, fg_alloccms, fg_allocems, or fg_allocxms routines.
  4261.  
  4262. Parameters
  4263.  
  4264.    page_number is the number of the virtual or logical page to release.  It
  4265.    must be between 0 and 63.
  4266.  
  4267. Return value
  4268.  
  4269.    A status code indicating the success or failure of the virtual page
  4270.    release, as shown below.
  4271.  
  4272.      0 = virtual page released
  4273.      1 = specified page is a physical page
  4274.      7 = virtual page released, but memory control blocks destroyed
  4275.      9 = attempt to release a virtual or logical page that was never created
  4276.  
  4277. Restrictions
  4278.  
  4279.    This routine has no effect if page_number references a physical video page,
  4280.    or a virtual page that was never created.
  4281.  
  4282. See also
  4283.  
  4284.    fg_allocate, fg_alloccms, fg_allocems, fg_allocxms
  4285.  
  4286. Examples
  4287.  
  4288.    8-3, 8-4, 8-5, 8-6, 8-8, 8-9, 8-11, 11-1, 11-2, 11-3, 11-4, 12-4, 12-5,
  4289.    13-2, 13-5, 17-1
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.                                       68
  4307. fg_getaddr
  4308.  
  4309. Prototype
  4310.  
  4311.    int fg_getaddr (void);
  4312.    function FGgetaddr% ()
  4313.    i*2 function fg_getaddr ()
  4314.    function fg_getaddr : integer;
  4315.  
  4316. Description
  4317.  
  4318.    The fg_getaddr routine returns the segment address of the active video
  4319.    page.
  4320.  
  4321. Parameters
  4322.  
  4323.    none
  4324.  
  4325. Return value
  4326.  
  4327.    The segment address of the active video page.
  4328.  
  4329. Restrictions
  4330.  
  4331.    none
  4332.  
  4333. See also
  4334.  
  4335.    fg_setpage
  4336.  
  4337. Examples
  4338.  
  4339.    8-8
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.  
  4364.  
  4365.                                       69
  4366. fg_getattr
  4367.  
  4368. Prototype
  4369.  
  4370.    int fg_getattr (int row, int column);
  4371.    function FGgetattr% (row%, column%)
  4372.    i*2 function fg_getattr (i*2 row, i*2 column)
  4373.    function fg_getattr (row, column : integer) : integer;
  4374.  
  4375. Description
  4376.  
  4377.    The fg_getattr routine returns the character attribute stored at the
  4378.    specified position on the active video page.
  4379.  
  4380. Parameters
  4381.  
  4382.    row is the row number of the character cell to examine, between 0 and 24
  4383.    (unless you've called fg_setlines to increase the number of lines per
  4384.    page).
  4385.  
  4386.    column is the column number of the character cell to examine, between 0 and
  4387.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  4388.  
  4389. Return value
  4390.  
  4391.    The character attribute stored at the specified position.
  4392.  
  4393. Restrictions
  4394.  
  4395.    This routine has no effect in graphics video modes.
  4396.  
  4397. See also
  4398.  
  4399.    fg_getchar, fg_getimage
  4400.  
  4401. Examples
  4402.  
  4403.    7-4
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.                                       70
  4425. fg_getblock
  4426.  
  4427. Prototype
  4428.  
  4429.    void fg_getblock (char far *buffer, int minx, int maxx, int miny,
  4430.      int maxy);
  4431.    sub FGgetblock (buffer$, minx%, maxx%, miny%, maxy%)
  4432.    subroutine fg_getblock (i*1 far buffer, i*2 minx, i*2 maxx, i*2 miny,
  4433.      i*2 maxy)
  4434.    procedure fg_getblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  4435.  
  4436. Description
  4437.  
  4438.    The fg_getblock routine retrieves a block (for later display with
  4439.    fg_putblock) from the specified position on the active video page.  In text
  4440.    modes, the block extremes are defined in character space; in graphics
  4441.    modes, they are defined in screen space.  Use the fg_imagesiz routine to
  4442.    determine the array size required to store the block.
  4443.  
  4444. Parameters
  4445.  
  4446.    buffer is the address of the array to receive the block.  Note that this is
  4447.    passed by FAR reference, except in QuickBASIC.
  4448.  
  4449.    minx is the screen space x coordinate of the block's left edge.  In
  4450.    graphics modes, its value is reduced to a byte boundary if necessary.
  4451.  
  4452.    maxx is the x coordinate of the block's right edge.  It must be greater
  4453.    than or equal to the value of minx.  In graphics modes, its value is
  4454.    extended to a byte boundary if necessary.
  4455.  
  4456.    miny is the y coordinate of the block's top edge.
  4457.  
  4458.    maxy is the y coordinate of the block's bottom edge.  It must be greater
  4459.    than or equal to the value of miny.
  4460.  
  4461. Return value
  4462.  
  4463.    none
  4464.  
  4465. Restrictions
  4466.  
  4467.    The maximum size of a block is 64K bytes.
  4468.  
  4469.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  4470.    procedure.  This is the only way to pass something by far reference in
  4471.    Pascal.
  4472.  
  4473. See also
  4474.  
  4475.    fg_imagesiz, fg_putblock
  4476.  
  4477. Examples
  4478.  
  4479.    11-8
  4480.  
  4481.  
  4482.  
  4483.                                       71
  4484. fg_getchar
  4485.  
  4486. Prototype
  4487.  
  4488.    int fg_getchar (int row, int column);
  4489.    function FGgetchar% (row%, column%)
  4490.    i*2 function fg_getchar (i*2 row, i*2 column)
  4491.    function fg_getchar (row, column : integer) : integer;
  4492.  
  4493. Description
  4494.  
  4495.    The fg_getchar routine returns the character value stored at the specified
  4496.    position on the active video page.
  4497.  
  4498. Parameters
  4499.  
  4500.    row is the row number of the character cell to examine, between 0 and 24
  4501.    (unless you've called fg_setlines to increase the number of lines per
  4502.    page).
  4503.  
  4504.    column is the column number of the character cell to examine, between 0 and
  4505.    39 for 40-column modes, or between 0 and 79 for 80-column modes.
  4506.  
  4507. Return value
  4508.  
  4509.    The character value stored at the specified position.
  4510.  
  4511. Restrictions
  4512.  
  4513.    This routine has no effect in graphics video modes.
  4514.  
  4515. See also
  4516.  
  4517.    fg_getattr, fg_getimage
  4518.  
  4519. Examples
  4520.  
  4521.    7-4
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.                                       72
  4543. fg_getclock
  4544.  
  4545. Prototype
  4546.  
  4547.    long fg_getclock (void);
  4548.    function FGgetclock& ()
  4549.    i*4 function fg_getclock ()
  4550.    function fg_getclock : longint;
  4551.  
  4552. Description
  4553.  
  4554.    The fg_getclock routine returns the number of clock ticks since midnight.
  4555.  
  4556. Parameters
  4557.  
  4558.    none
  4559.  
  4560. Return value
  4561.  
  4562.    The number of clock ticks since midnight.  There are approximately 18.2
  4563.    clock ticks per second.
  4564.  
  4565. Restrictions
  4566.  
  4567.    none
  4568.  
  4569. Examples
  4570.  
  4571.    16-2
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.                                       73
  4602. fg_getcolor
  4603.  
  4604. Prototype
  4605.  
  4606.    int fg_getcolor (void);
  4607.    function FGgetcolor% ()
  4608.    i*2 function fg_getcolor ()
  4609.    function fg_getcolor : integer;
  4610.  
  4611. Description
  4612.  
  4613.    The fg_getcolor routine returns the current text attribute (in text modes)
  4614.    or color index (in graphics modes), as defined by the most recent call to
  4615.    fg_setattr or fg_setcolor.
  4616.  
  4617. Parameters
  4618.  
  4619.    none
  4620.  
  4621. Return value
  4622.  
  4623.    In graphics video modes, the return value is the current color index.  In
  4624.    text modes, it is the current text attribute.
  4625.  
  4626. Restrictions
  4627.  
  4628.    none
  4629.  
  4630. See also
  4631.  
  4632.    fg_setattr, fg_setcolor
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.                                       74
  4661. fg_getdacs
  4662.  
  4663. Prototype
  4664.  
  4665.    void fg_getdacs (int start, int count, char *values);
  4666.    sub FGgetdacs (start%, count%, values$)
  4667.    subroutine fg_getdacs (i*2 start, i*2 count, i*1 values)
  4668.    procedure fg_getdacs (start, count : integer; var values : shortint);
  4669.  
  4670. Description
  4671.  
  4672.    The fg_getdacs routine retrieves the red, green, and blue color components
  4673.    of a contiguous block of video DAC registers.  Each color component is a
  4674.    value between 0 and 63; increasing values produce more intense colors.
  4675.    Reading many DAC registers with fg_getdacs is considerably faster than
  4676.    doing so individually with fg_getrgb.
  4677.  
  4678. Parameters
  4679.  
  4680.    start is the starting video DAC register number, between 0 and 255.
  4681.  
  4682.    count is the number of contiguous DAC registers to retrieve, between 1 and
  4683.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  4684.    around and resume with register number 0.
  4685.  
  4686.    values is the array that will receive the color components.  The first
  4687.    three bytes of this array receive the red, green, and blue components for
  4688.    DAC register start, the next three bytes receive the components for
  4689.    register start+1, and so forth.  The size of the values array must be at
  4690.    least 3*count bytes.
  4691.  
  4692. Return value
  4693.  
  4694.    none
  4695.  
  4696. Restrictions
  4697.  
  4698.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  4699.    graphics modes.  In modes 13 to 16, it is meaningful only when run on a VGA
  4700.    or SVGA system; its results are unpredictable in these modes when run on an
  4701.    EGA.  You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  4702.  
  4703. See also
  4704.  
  4705.    fg_getrgb, fg_setdacs, fg_setrgb
  4706.  
  4707. Examples
  4708.  
  4709.    5-12
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.                                       75
  4720. fg_getentry
  4721.  
  4722. Prototype
  4723.  
  4724.    void fg_getentry (int page_number, int *page_addr, int *page_type);
  4725.    sub FGgetentry (page_number%, page_addr%, page_type%)
  4726.    subroutine fg_getentry (i*2 page_number, i*2 page_addr, i*2 page_type)
  4727.    procedure fg_getentry (page_number : integer; var page_addr,
  4728.      page_type : integer);
  4729.  
  4730. Description
  4731.  
  4732.    The fg_getentry routine retrieves the type and address of a physical,
  4733.    virtual, or logical video page.  This routine is useful for saving virtual
  4734.    or logical page contents across video mode changes.
  4735.  
  4736. Parameters
  4737.  
  4738.    page_number is the number of the desired video page.  It must be between 0
  4739.    and 63.
  4740.  
  4741.    page_addr is the address of the specified page.  For physical pages,
  4742.    virtual pages, and logical pages in conventional memory, the address is an
  4743.    ordinary segment address.  For logical pages in EMS or XMS memory, the page
  4744.    address is an EMS or XMS handle.
  4745.  
  4746.    page_type is a return value indicating the page type, as shown below:
  4747.      0 = unallocated page
  4748.      1 = physical page
  4749.      2 = virtual page
  4750.      3 = logical page in expanded memory (EMS)
  4751.      4 = logical page in extended memory (XMS)
  4752.      5 = logical page in conventional memory
  4753.  
  4754. Return value
  4755.  
  4756.    none
  4757.  
  4758. Restrictions
  4759.  
  4760.    none
  4761.  
  4762. See also
  4763.  
  4764.    fg_setentry
  4765.  
  4766. Examples
  4767.  
  4768.    8-11
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.                                       76
  4779. fg_gethpage
  4780.  
  4781. Prototype
  4782.  
  4783.    int fg_gethpage (void);
  4784.    function FGgethpage% ()
  4785.    i*2 function fg_gethpage ()
  4786.    function fg_gethpage : integer;
  4787.  
  4788. Description
  4789.  
  4790.    The fg_gethpage routine returns the hidden video page number (as set in the
  4791.    most recent call to fg_sethpage).
  4792.  
  4793. Parameters
  4794.  
  4795.    none
  4796.  
  4797. Return value
  4798.  
  4799.    The number of the hidden video page, between 0 and 63.
  4800.  
  4801. Restrictions
  4802.  
  4803.    none
  4804.  
  4805. See also
  4806.  
  4807.    fg_sethpage
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.                                       77
  4838. fg_getimage
  4839.  
  4840. Prototype
  4841.  
  4842.    void fg_getimage (char *map_array, int width, int height);
  4843.    sub FGgetimage (map_array$, width%, height%)
  4844.    subroutine fg_getimage (i*1 map_array, i*2 width, i*2 height)
  4845.    procedure fg_getimage (var map_array : byte; width, height : integer);
  4846.  
  4847. Description
  4848.  
  4849.    The fg_getimage routine retrieves an image as a mode-specific bit map.  The
  4850.    graphics cursor position (the text cursor position in text video modes)
  4851.    defines the lower left corner of the image to retrieve. Refer to the
  4852.    Fastgraph User's Guide for complete information about mode-specific bit
  4853.    maps.
  4854.  
  4855. Parameters
  4856.  
  4857.    map_array is the arbitrary-length array in which to retrieve the bit map.
  4858.    In BASIC, you must explicitly declare map_array as a fixed-length string
  4859.    variable of length width*height.
  4860.  
  4861.    width is the width in bytes of the bit map.
  4862.  
  4863.    height is the height in bytes (pixel rows) of the bit map.
  4864.  
  4865. Return value
  4866.  
  4867.    none
  4868.  
  4869. Restrictions
  4870.  
  4871.    none
  4872.  
  4873. See also
  4874.  
  4875.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getmap, fg_putimage, fg_revimage
  4876.  
  4877. Examples
  4878.  
  4879.    10-12, 10-13
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.                                       78
  4897. fg_getindex
  4898.  
  4899. Prototype
  4900.  
  4901.    int fg_getindex (int index);
  4902.    function FGgetindex% (index%)
  4903.    i*2 function fg_getindex (i*2 index)
  4904.    function fg_getindex (index : integer) : integer;
  4905.  
  4906. Description
  4907.  
  4908.    The fg_getindex routine returns the color value assigned to a specified
  4909.    virtual color index.
  4910.  
  4911. Parameters
  4912.  
  4913.    index is the virtual color index to retrieve, between 0 and 255.
  4914.  
  4915. Return value
  4916.  
  4917.    In graphics video modes with fewer than 256 available colors, the return
  4918.    value is the color value assigned to the specified virtual index.  In text
  4919.    modes and 256-color graphics modes, the fg_getindex routine returns the
  4920.    value passed to it.
  4921.  
  4922. Restrictions
  4923.  
  4924.    none
  4925.  
  4926. See also
  4927.  
  4928.    fg_defcolor, fg_palette, fg_setcolor
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.                                       79
  4956. fg_getkey
  4957.  
  4958. Prototype
  4959.  
  4960.    void fg_getkey (unsigned char *key, unsigned char *aux);
  4961.    sub FGgetkey (key$, aux$)
  4962.    subroutine fg_getkey (i*1 key, i*1 aux)
  4963.    procedure fg_getkey (var key, aux : byte);
  4964.  
  4965. Description
  4966.  
  4967.    The fg_getkey routine waits for a keystroke, or reads the next entry from
  4968.    the BIOS keyboard buffer (without echo).  It returns the keystroke's
  4969.    standard or extended keyboard code (a list of these appears in Chapter 14
  4970.    of the Fastgraph User's Guide).
  4971.  
  4972. Parameters
  4973.  
  4974.    key receives the keystroke's standard keyboard code if it represents a
  4975.    standard character.  If the keystroke represents an extended character, key
  4976.    will be set to zero.  In BASIC, you must explicitly declare key as a fixed-
  4977.    length string variable of length 1.
  4978.  
  4979.    aux receives the keystroke's extended keyboard code if it represents an
  4980.    extended character.  If the keystroke represents a standard character, aux
  4981.    will be set to zero.  In BASIC, you must explicitly declare aux as a fixed-
  4982.    length string variable of length 1.
  4983.  
  4984. Return value
  4985.  
  4986.    none
  4987.  
  4988. Restrictions
  4989.  
  4990.    none
  4991.  
  4992. See also
  4993.  
  4994.    fg_intkey, fg_kbtest, fg_waitkey
  4995.  
  4996. Examples
  4997.  
  4998.    13-7, 14-1, 16-2
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.                                       80
  5015. fg_getlines
  5016.  
  5017. Prototype
  5018.  
  5019.    int fg_getlines (void);
  5020.    function FGgetlines% ()
  5021.    i*2 function fg_getlines ()
  5022.    function fg_getlines : integer;
  5023.  
  5024. Description
  5025.  
  5026.    The fg_getlines routine returns the number of text rows per video page for
  5027.    the current video mode.
  5028.  
  5029. Parameters
  5030.  
  5031.    none
  5032.  
  5033. Return value
  5034.  
  5035.    The number of text rows per video page for the current video mode.
  5036.  
  5037. Restrictions
  5038.  
  5039.    none
  5040.  
  5041. See also
  5042.  
  5043.    fg_fontsize, fg_setlines
  5044.  
  5045. Examples
  5046.  
  5047.    3-5
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.                                       81
  5074. fg_getmap
  5075.  
  5076. Prototype
  5077.  
  5078.    void fg_getmap (char *map_array, int width, int height);
  5079.    sub FGgetmap (map_array$, width%, height%)
  5080.    subroutine fg_getmap (i*1 map_array, i*2 width, i*2 height)
  5081.    procedure fg_getmap (var map_array : byte; width, height : integer);
  5082.  
  5083. Description
  5084.  
  5085.    The fg_getmap routine retrieves an image as a mode-independent bit map.
  5086.    The graphics cursor position defines the lower left corner of the image to
  5087.    retrieve.  Refer to the Fastgraph User's Guide for complete information
  5088.    about mode-independent bit maps.
  5089.  
  5090. Parameters
  5091.  
  5092.    map_array is the arbitrary-length array in which to retrieve the bit map.
  5093.    Each byte of map_array represents eight pixels.  Pixels of the current
  5094.    color set the corresponding bits in map_array.  Pixels of other colors make
  5095.    the corresponding map_array bits zero.  In BASIC, you must explicitly
  5096.    declare map_array as a fixed-length string variable of length width*height.
  5097.  
  5098.    width is the width in bytes of the bit map.
  5099.  
  5100.    height is the height in bytes (pixel rows) of the bit map.
  5101.  
  5102. Return value
  5103.  
  5104.    none
  5105.  
  5106. Restrictions
  5107.  
  5108.    This routine has no effect in text video modes.
  5109.  
  5110. See also
  5111.  
  5112.    fg_drawmap, fg_getimage
  5113.  
  5114. Examples
  5115.  
  5116.    10-10, 10-11
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.                                       82
  5133. fg_getmaxx
  5134.  
  5135. Prototype
  5136.  
  5137.    int fg_getmaxx (void);
  5138.    function FGgetmaxx% ()
  5139.    i*2 function fg_getmaxx ()
  5140.    function fg_getmaxx : integer;
  5141.  
  5142. Description
  5143.  
  5144.    The fg_getmaxx routine returns the maximum x coordinate in screen space
  5145.    when used in a graphics video mode.  It returns the maximum column number
  5146.    in character space when used in a text mode.  In either case, the maximum x
  5147.    coordinate is one less than the horizontal screen resolution.
  5148.  
  5149. Parameters
  5150.  
  5151.    none
  5152.  
  5153. Return value
  5154.  
  5155.    The maximum x coordinate.
  5156.  
  5157. Restrictions
  5158.  
  5159.    none
  5160.  
  5161. See also
  5162.  
  5163.    fg_getmaxy
  5164.  
  5165. Examples
  5166.  
  5167.    4-1, 4-2
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.                                       83
  5192. fg_getmaxy
  5193.  
  5194. Prototype
  5195.  
  5196.    int fg_getmaxy (void);
  5197.    function FGgetmaxy% ()
  5198.    i*2 function fg_getmaxy ()
  5199.    function fg_getmaxy : integer;
  5200.  
  5201. Description
  5202.  
  5203.    The fg_getmaxy routine returns the maximum y coordinate in screen space
  5204.    when used in a graphics video mode.  It returns the maximum row number in
  5205.    character space when used in a text mode.  In either case, the maximum y
  5206.    coordinate is one less than the vertical screen resolution.
  5207.  
  5208. Parameters
  5209.  
  5210.    none
  5211.  
  5212. Return value
  5213.  
  5214.    The maximum y coordinate.
  5215.  
  5216. Restrictions
  5217.  
  5218.    none
  5219.  
  5220. See also
  5221.  
  5222.    fg_getmaxx
  5223.  
  5224. Examples
  5225.  
  5226.    4-1, 4-2
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.                                       84
  5251. fg_getmode
  5252.  
  5253. Prototype
  5254.  
  5255.    int fg_getmode (void);
  5256.    function FGgetmode% ()
  5257.    i*2 function fg_getmode ()
  5258.    function fg_getmode : integer;
  5259.  
  5260. Description
  5261.  
  5262.    The fg_getmode routine returns the current video mode number.  It is
  5263.    typically one of the first Fastgraph routines called in a program.  The
  5264.    value returned by fg_getmode can be retained to restore the original video
  5265.    mode when a program transfers control back to DOS.
  5266.  
  5267. Parameters
  5268.  
  5269.    none
  5270.  
  5271. Return value
  5272.  
  5273.    The current video mode number, between 0 and 29.  Refer to the description
  5274.    of the fg_setmode routine for descriptions of each video mode.
  5275.  
  5276. Restrictions
  5277.  
  5278.    none
  5279.  
  5280. See also
  5281.  
  5282.    fg_setmode
  5283.  
  5284. Examples
  5285.  
  5286.    3-3, 3-4, 3-5, 3-6, 3-7, 3-8, 3-10
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.                                       85
  5310. fg_getpage
  5311.  
  5312. Prototype
  5313.  
  5314.    int fg_getpage (void);
  5315.    function FGgetpage% ()
  5316.    i*2 function fg_getpage ()
  5317.    function fg_getpage : integer;
  5318.  
  5319. Description
  5320.  
  5321.    The fg_getpage routine returns the active video page number (as set in the
  5322.    most recent call to fg_setpage).
  5323.  
  5324. Parameters
  5325.  
  5326.    none
  5327.  
  5328. Return value
  5329.  
  5330.    The number of the active video page, between 0 and 63.
  5331.  
  5332. Restrictions
  5333.  
  5334.    none
  5335.  
  5336. See also
  5337.  
  5338.    fg_setpage
  5339.  
  5340. Examples
  5341.  
  5342.    8-8
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.  
  5367.  
  5368.                                       86
  5369. fg_getpixel
  5370.  
  5371. Prototype
  5372.  
  5373.    int fg_getpixel (int ix, int iy);
  5374.    function FGgetpixel% (ix%, iy%)
  5375.    i*2 function fg_getpixel (i*2 ix, i*2 iy)
  5376.    function fg_getpixel (ix, iy : integer) : integer;
  5377.  
  5378. Description
  5379.  
  5380.    The fg_getpixel routine returns the color value of a specified pixel.
  5381.  
  5382. Parameters
  5383.  
  5384.    ix is the pixel's screen space x coordinate.
  5385.  
  5386.    iy is the pixel's screen space y coordinate.
  5387.  
  5388. Return value
  5389.  
  5390.    The color value of the pixel, between 0 and one less than the number of
  5391.    colors available in the current video mode.  In text modes, fg_getpixel
  5392.    always returns zero.
  5393.  
  5394. Restrictions
  5395.  
  5396.    none
  5397.  
  5398. See also
  5399.  
  5400.    fg_point, fg_pointw
  5401.  
  5402. Examples
  5403.  
  5404.    6-1
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.                                       87
  5428. fg_getrgb
  5429.  
  5430. Prototype
  5431.  
  5432.    void fg_getrgb (int number, int *red, int *green, int *blue);
  5433.    sub FGgetrgb (number%, red%, green%, blue%)
  5434.    subroutine fg_getrgb (i*2 number, i*2 red, i*2 green, i*2 blue)
  5435.    procedure fg_getrgb (number : integer; var red, green, blue : integer);
  5436.  
  5437. Description
  5438.  
  5439.    The fg_getrgb routine returns the red, green, and blue color components for
  5440.    a specified video DAC register.  Each color component is a value between 0
  5441.    and 63; increasing values produce more intense colors.
  5442.  
  5443. Parameters
  5444.  
  5445.    number is the video DAC register number.  It must be between 0 and 15 in
  5446.    video modes 17, 18, 28, and 29, and between 0 and 255 in modes 19 through
  5447.    27.  It may also assume the values 13, 14, or 16 when run on a VGA or SVGA
  5448.    system.  This routine has no effect in these modes when run on an EGA
  5449.    system.
  5450.  
  5451.    red, green, and blue respectively receive the red, green, and blue
  5452.    components of the specified video DAC register.
  5453.  
  5454. Return value
  5455.  
  5456.    none
  5457.  
  5458. Restrictions
  5459.  
  5460.    This routine has no effect in text video modes, or in any graphics video
  5461.    mode numbered 16 or below (because these video modes do not use DAC
  5462.    registers).
  5463.  
  5464. See also
  5465.  
  5466.    fg_getdacs, fg_palette, fg_setdacs, fg_setrgb
  5467.  
  5468. Examples
  5469.  
  5470.    5-11
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.                                       88
  5487. fg_getvpage
  5488.  
  5489. Prototype
  5490.  
  5491.    int fg_getvpage (void);
  5492.    function FGgetvpage% ()
  5493.    i*2 function fg_getvpage ()
  5494.    function fg_getvpage : integer;
  5495.  
  5496. Description
  5497.  
  5498.    The fg_getvpage routine returns the visual video page number (as set in the
  5499.    most recent call to fg_setvpage).
  5500.  
  5501. Parameters
  5502.  
  5503.    none
  5504.  
  5505. Return value
  5506.  
  5507.    The number of the visual video page, between 0 and 63.
  5508.  
  5509. Restrictions
  5510.  
  5511.    none
  5512.  
  5513. See also
  5514.  
  5515.    fg_setvpage
  5516.  
  5517. Examples
  5518.  
  5519.    8-8
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.                                       89
  5546. fg_getworld
  5547.  
  5548. Prototype
  5549.  
  5550.    void fg_getworld (double *xmin, double *xmax, double *ymin, double *ymax);
  5551.    sub FGgetworld (xmin#, xmax#, ymin#, ymax#)
  5552.    subroutine fg_getworld (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  5553.    procedure fg_getworld (var xmin, xmax, ymin, ymax : real);
  5554.  
  5555. Description
  5556.  
  5557.    The fg_getworld routine returns the current world space limits, as defined
  5558.    in the most recent call to fg_setworld.
  5559.  
  5560. Parameters
  5561.  
  5562.    xmin receives the world space coordinate of the screen's left edge.
  5563.  
  5564.    xmax receives the world space coordinate of the screen's right edge.
  5565.  
  5566.    ymin receives the world space coordinate of the screen's top edge.
  5567.  
  5568.    ymax receives the world space coordinate of the screen's bottom edge.
  5569.  
  5570. Return value
  5571.  
  5572.    none
  5573.  
  5574. Restrictions
  5575.  
  5576.    This routine is not available in Fastgraph/Light.
  5577.  
  5578. See also
  5579.  
  5580.    fg_setworld
  5581.  
  5582. Examples
  5583.  
  5584.    4-3
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.                                       90
  5605. fg_getxjoy
  5606.  
  5607. Prototype
  5608.  
  5609.    int fg_getxjoy (int n);
  5610.    function FGgetxjoy% (n%)
  5611.    i*2 function fg_getxjoy (i*2 n)
  5612.    function fg_getxjoy (n : integer) : integer;
  5613.  
  5614. Description
  5615.  
  5616.    The fg_getxjoy routine returns the horizontal coordinate position of the
  5617.    specified joystick.  The actual coordinates depend on the processor speed
  5618.    and brand of joystick used.
  5619.  
  5620. Parameters
  5621.  
  5622.    n specifies the joystick number, either 1 or 2.
  5623.  
  5624. Return value
  5625.  
  5626.    If the return value is positive, it represents the current horizontal
  5627.    coordinate position of the requested joystick.  If the return value is -1,
  5628.    it means the requested joystick has not been initialized or is not present.
  5629.  
  5630. Restrictions
  5631.  
  5632.    Before using this routine, you must use the fg_initjoy routine to
  5633.    initialize the requested joystick.
  5634.  
  5635. See also
  5636.  
  5637.    fg_button, fg_getyjoy, fg_initjoy, fg_intjoy
  5638.  
  5639. Examples
  5640.  
  5641.    14-12
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.                                       91
  5664. fg_getxpos
  5665.  
  5666. Prototype
  5667.  
  5668.    int fg_getxpos (void);
  5669.    function FGgetxpos% ()
  5670.    i*2 function fg_getxpos ()
  5671.    function fg_getxpos : integer;
  5672.  
  5673. Description
  5674.  
  5675.    The fg_getxpos routine returns the screen space x coordinate of the
  5676.    graphics cursor position.
  5677.  
  5678. Parameters
  5679.  
  5680.    none
  5681.  
  5682. Return value
  5683.  
  5684.    The x coordinate of graphics cursor position.
  5685.  
  5686. Restrictions
  5687.  
  5688.    none
  5689.  
  5690. See also
  5691.  
  5692.    fg_getypos
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.                                       92
  5723. fg_getyjoy
  5724.  
  5725. Prototype
  5726.  
  5727.    int fg_getyjoy (int n);
  5728.    function FGgetyjoy% (n%)
  5729.    i*2 function fg_getyjoy (i*2 n)
  5730.    function fg_getyjoy (n : integer) : integer;
  5731.  
  5732. Description
  5733.  
  5734.    The fg_getyjoy routine returns the vertical coordinate position of the
  5735.    specified joystick.  The actual coordinates depend on the processor speed
  5736.    and brand of joystick used.
  5737.  
  5738. Parameters
  5739.  
  5740.    n specifies the joystick number, either 1 or 2.
  5741.  
  5742. Return value
  5743.  
  5744.    If the return value is positive, it represents the current vertical
  5745.    coordinate position of the requested joystick.  If the return value is -1,
  5746.    it means the requested joystick has not been initialized or is not present.
  5747.  
  5748. Restrictions
  5749.  
  5750.    Before using this routine, you must use the fg_initjoy routine to
  5751.    initialize the requested joystick.
  5752.  
  5753. See also
  5754.  
  5755.    fg_button, fg_getxjoy, fg_initjoy, fg_intjoy
  5756.  
  5757. Examples
  5758.  
  5759.    14-12
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.                                       93
  5782. fg_getypos
  5783.  
  5784. Prototype
  5785.  
  5786.    int fg_getypos (void);
  5787.    function FGgetypos% ()
  5788.    i*2 function fg_getypos ()
  5789.    function fg_getypos : integer;
  5790.  
  5791. Description
  5792.  
  5793.    The fg_getypos routine returns the screen space y coordinate of the
  5794.    graphics cursor position.
  5795.  
  5796. Parameters
  5797.  
  5798.    none
  5799.  
  5800. Return value
  5801.  
  5802.    The y coordinate of graphics cursor position.
  5803.  
  5804. Restrictions
  5805.  
  5806.    none
  5807.  
  5808. See also
  5809.  
  5810.    fg_getxpos
  5811.  
  5812.  
  5813.  
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829.  
  5830.  
  5831.  
  5832.  
  5833.  
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.                                       94
  5841. fg_hush
  5842.  
  5843. Prototype
  5844.  
  5845.    void fg_hush (void);
  5846.    sub FGhush ()
  5847.    subroutine fg_hush ()
  5848.    procedure fg_hush;
  5849.  
  5850. Description
  5851.  
  5852.    The fg_hush routine immediately stops asynchronous sound started with the
  5853.    fg_musicb, fg_sounds, or fg_voices routines.  It has no effect if there is
  5854.    no asynchronous sound in progress.
  5855.  
  5856. Parameters
  5857.  
  5858.    none
  5859.  
  5860. Return value
  5861.  
  5862.    none
  5863.  
  5864. Restrictions
  5865.  
  5866.    none
  5867.  
  5868. See also
  5869.  
  5870.    fg_hushnext, fg_musicb, fg_sounds, fg_suspend, fg_voices
  5871.  
  5872. Examples
  5873.  
  5874.    15-7
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.  
  5894.  
  5895.  
  5896.  
  5897.  
  5898.  
  5899.                                       95
  5900. fg_hushnext
  5901.  
  5902. Prototype
  5903.  
  5904.    void fg_hushnext (void);
  5905.    sub FGhushnext ()
  5906.    subroutine fg_hushnext ()
  5907.    procedure fg_hushnext;
  5908.  
  5909. Description
  5910.  
  5911.    The fg_hushnext routine stops asynchronous sound started with the
  5912.    fg_musicb, fg_sounds, or fg_voices routines, but not until the current
  5913.    repetition finishes.  It has no effect if there is no asynchronous sound in
  5914.    progress.
  5915.  
  5916. Parameters
  5917.  
  5918.    none
  5919.  
  5920. Return value
  5921.  
  5922.    none
  5923.  
  5924. Restrictions
  5925.  
  5926.    This routine has no effect unless the asynchronous sound is continuous.
  5927.  
  5928. See also
  5929.  
  5930.    fg_hush, fg_musicb, fg_sounds, fg_suspend, fg_voices
  5931.  
  5932. Examples
  5933.  
  5934.    15-7
  5935.  
  5936.  
  5937.  
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.                                       96
  5959. fg_imagebuf
  5960.  
  5961. Prototype
  5962.  
  5963.    void fg_imagebuf (char far *buffer, unsigned size);
  5964.    sub FGimagebuf (buffer$, size%)
  5965.    subroutine fg_imagebuf (i*1 far buffer, i*2 size)
  5966.    procedure fg_imagebuf (buffer : pointer; size : word);
  5967.  
  5968. Description
  5969.  
  5970.    The fg_imagebuf routine specifies the size and address of the buffer used
  5971.    internally when creating or displaying GIF, PCX, PPR, or SPR files.
  5972.    Fastgraph's default internal buffer size is 4,096 bytes.  Image display or
  5973.    creation is typically faster when a larger buffer is used.
  5974.  
  5975. Parameters
  5976.  
  5977.    buffer is the segmented address of the internal buffer.  Note that this is
  5978.    passed as a FAR address, except in QuickBASIC.
  5979.  
  5980.    size is the buffer size in bytes.  If size is zero, Fastgraph will use its
  5981.    own internal buffers when creating or displaying image files.
  5982.  
  5983. Return value
  5984.  
  5985.    none
  5986.  
  5987. Restrictions
  5988.  
  5989.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  5990.    procedure.  This is the only way to pass something by far reference in
  5991.    Pascal.
  5992.  
  5993. See also
  5994.  
  5995.    fg_dispfile, fg_makegif, fg_makepcx, fg_makeppr, fg_makespr, fg_showgif,
  5996.    fg_showpcx, fg_showppr, fg_showspr
  5997.  
  5998. Examples
  5999.  
  6000.    9-7
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.                                       97
  6018. fg_imagesiz
  6019.  
  6020. Prototype
  6021.  
  6022.    long fg_imagesiz (int width, int height);
  6023.    function FGimagesiz& (width%, height%)
  6024.    i*4 function fg_imagesiz (i*2 width, i*2 height)
  6025.    function fg_imagesiz (width, height : integer) : longint;
  6026.  
  6027. Description
  6028.  
  6029.    The fg_imagesiz routine determines the number of bytes required to store a
  6030.    mode-specific bit-mapped image of specified dimensions.
  6031.  
  6032. Parameters
  6033.  
  6034.    width specifies the image width in pixels.
  6035.  
  6036.    height specifies the image height in pixels.
  6037.  
  6038. Return value
  6039.  
  6040.    The number of bytes required to store a mode-specific bit-mapped image of
  6041.    the specified size in the current video mode.
  6042.  
  6043. Restrictions
  6044.  
  6045.    none
  6046.  
  6047. See also
  6048.  
  6049.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_revimage
  6050.  
  6051. Examples
  6052.  
  6053.    10-12
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.  
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.                                       98
  6077. fg_initems
  6078.  
  6079. Prototype
  6080.  
  6081.    int fg_initems (void);
  6082.    function FGinitems% ()
  6083.    i*2 function fg_initems ()
  6084.    function fg_initems : integer;
  6085.  
  6086. Description
  6087.  
  6088.    The fg_initems routine initializes expanded memory (EMS) for use with
  6089.    Fastgraph.
  6090.  
  6091. Parameters
  6092.  
  6093.    none
  6094.  
  6095. Return value
  6096.  
  6097.     0 = success
  6098.    -1 = Expanded Memory Manager not installed or not accessible
  6099.  
  6100. Restrictions
  6101.  
  6102.    This routine requires an Expanded Memory Manager (EMM) that conforms to the
  6103.    Lotus/Intel/Microsoft Expanded Memory Specification (LIM-EMS) version 3.2
  6104.    or later.  On 80386 and 80486 systems, the EMM386.EXE device driver
  6105.    supplied with DOS 5.0 can be used to treat some or all of extended memory
  6106.    as expanded memory.
  6107.  
  6108.    The Expanded Memory Manager uses interrupt 67h.  As a result, this vector
  6109.    is not available for application programs.
  6110.  
  6111. See also
  6112.  
  6113.    fg_allocems, fg_initxms
  6114.  
  6115. Examples
  6116.  
  6117.    8-9
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.                                       99
  6136. fg_initjoy
  6137.  
  6138. Prototype
  6139.  
  6140.    int fg_initjoy (int n);
  6141.    function FGinitjoy% (n%)
  6142.    i*2 function fg_initjoy (i*2 n)
  6143.    function fg_initjoy (n : integer) : integer;
  6144.  
  6145. Description
  6146.  
  6147.    The fg_initjoy routine initializes either joystick and must be called
  6148.    before using fg_getxjoy, fg_getyjoy, or fg_intjoy.
  6149.  
  6150. Parameters
  6151.  
  6152.    n specifies the joystick number, either 1 or 2.
  6153.  
  6154. Return value
  6155.  
  6156.    If the return value is 0, it means the joystick initialization was
  6157.    successful.  If it is -1, it means the machine has no game port, or the
  6158.    requested joystick is not connected to the game port.
  6159.  
  6160. Restrictions
  6161.  
  6162.    When you call fg_initjoy, Fastgraph assumes the requested joystick is
  6163.    centered.
  6164.  
  6165. See also
  6166.  
  6167.    fg_button, fg_getxjoy, fg_getyjoy, fg_intjoy
  6168.  
  6169. Examples
  6170.  
  6171.    14-11, 14-12, 14-13
  6172.  
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.                                      100
  6195. fg_initw
  6196.  
  6197. Prototype
  6198.  
  6199.    void fg_initw (void);
  6200.    sub FGinitw ()
  6201.    subroutine fg_initw ()
  6202.    procedure fg_initw;
  6203.  
  6204. Description
  6205.  
  6206.    The fg_initw routine initializes Fastgraph's internal parameters for world
  6207.    space.  This routine must be called once, before any other routine that
  6208.    uses world space coordinates.
  6209.  
  6210. Parameters
  6211.  
  6212.    none
  6213.  
  6214. Return value
  6215.  
  6216.    none
  6217.  
  6218. Restrictions
  6219.  
  6220.    This routine is not available in Fastgraph/Light.
  6221.  
  6222. Examples
  6223.  
  6224.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  6225.  
  6226.  
  6227.  
  6228.  
  6229.  
  6230.  
  6231.  
  6232.  
  6233.  
  6234.  
  6235.  
  6236.  
  6237.  
  6238.  
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.                                      101
  6254. fg_initxms
  6255.  
  6256. Prototype
  6257.  
  6258.    int fg_initxms (void);
  6259.    function FGinitxms% ()
  6260.    i*2 function fg_initxms ()
  6261.    function fg_initxms : integer;
  6262.  
  6263. Description
  6264.  
  6265.    The fg_initxms routine initializes extended memory (XMS) for use with
  6266.    Fastgraph.
  6267.  
  6268. Parameters
  6269.  
  6270.    none
  6271.  
  6272. Return value
  6273.  
  6274.     0 = success
  6275.    -1 = XMS driver not installed or not accessible
  6276.  
  6277. Restrictions
  6278.  
  6279.    This routine requires an external driver that conforms to the
  6280.    Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS) version 2.0,
  6281.    such as HIMEM.SYS.  XMS drivers require an 80286, 80386, or 80486 system.
  6282.  
  6283. See also
  6284.  
  6285.    fg_allocxms, fg_initems
  6286.  
  6287. Examples
  6288.  
  6289.    8-9
  6290.  
  6291.  
  6292.  
  6293.  
  6294.  
  6295.  
  6296.  
  6297.  
  6298.  
  6299.  
  6300.  
  6301.  
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.                                      102
  6313. fg_inside
  6314.  
  6315. Prototype
  6316.  
  6317.    int fg_inside (int *vertex_array, int n, int ix, int iy);
  6318.    function FGinside% (vertex_array%(), n%, ix%, iy%)
  6319.    i*2 function fg_inside (i*2 vertex_array, i*2 n, i*2 ix, i*2 iy)
  6320.    function fg_inside (var vertex_array : integer; n, ix, iy : integer) :
  6321.      integer;
  6322.  
  6323. Description
  6324.  
  6325.    The fg_inside routine determines if the specified point is inside a convex
  6326.    polygon.
  6327.  
  6328. Parameters
  6329.  
  6330.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  6331.    pairs of each vertex.  The first array element is the x component of the
  6332.    first vertex, the second element is the y component of the first vertex,
  6333.    the third element is the x component of the second vertex, and so forth.
  6334.  
  6335.    n is the number of vertices in the polygon.  Normally, it is one-half the
  6336.    size of vertex_array.
  6337.  
  6338.    ix is the screen space x coordinate of the test point.
  6339.  
  6340.    iy is the screen space y coordinate of the test point.
  6341.  
  6342. Return value
  6343.  
  6344.    0 = the test point is outside the polygon
  6345.    1 = the test point is inside the polygon
  6346.  
  6347. Restrictions
  6348.  
  6349.    If vertex_array does not define a convex polygon, the return value is
  6350.    undefined.
  6351.  
  6352. See also
  6353.  
  6354.    fg_polyfill, fg_polyline
  6355.  
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.                                      103
  6372. fg_intjoy
  6373.  
  6374. Prototype
  6375.  
  6376.    void fg_intjoy (int n, char *key, char *aux);
  6377.    sub FGintjoy (n%, key$, aux$)
  6378.    subroutine fg_intjoy (i*2 n, i*1 key, i*1 aux)
  6379.    procedure fg_intjoy (n : integer; var key, aux : byte);
  6380.  
  6381. Description
  6382.  
  6383.    The fg_intjoy routine returns the standard and extended keyboard codes
  6384.    analogous to the current position and button status of the specified
  6385.    joystick.
  6386.  
  6387. Parameters
  6388.  
  6389.    n specifies the joystick number, either 1 or 2.
  6390.  
  6391.    key receives the joystick's button status.  If any button on the requested
  6392.    joystick is pressed, key is set to 13, the standard keyboard code for the
  6393.    Enter key.  If no buttons are pressed, key is set to zero.  In BASIC, you
  6394.    must explicitly declare key as a fixed-length string variable of length 1.
  6395.  
  6396.    aux receives the joystick's analog position, as listed below.  In BASIC,
  6397.    you must explicitly declare aux as a fixed-length string variable of length
  6398.    1.
  6399.  
  6400.        joystick position   corresponding key   extended key code
  6401.  
  6402.           up and left            Home                 71
  6403.               up               up arrow               72
  6404.          up and right            PgUp                 73
  6405.              left             left arrow              75
  6406.            centered           (no action)              0
  6407.              right            right arrow             77
  6408.          down and left            End                 79
  6409.              down             down arrow              80
  6410.         down and right           PgDn                 81
  6411.  
  6412.    If the requested joystick has not been initialized, both key and aux will
  6413.    be set to zero.
  6414.  
  6415. Return value
  6416.  
  6417.    none
  6418.  
  6419. Restrictions
  6420.  
  6421.    Before using this routine, you must use the fg_initjoy routine to
  6422.    initialize the requested joystick.
  6423.  
  6424. See also
  6425.  
  6426.    fg_button, fg_getxjoy, fg_getyjoy, fg_initjoy, fg_intkey
  6427.  
  6428.  
  6429.  
  6430.                                      104
  6431. fg_intjoy (continued)
  6432.  
  6433. Examples
  6434.  
  6435.    14-13
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.  
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.                                      105
  6490. fg_intkey
  6491.  
  6492. Prototype
  6493.  
  6494.    void fg_intkey (unsigned char *key, unsigned char *aux);
  6495.    sub FGintkey (key$, aux$)
  6496.    subroutine fg_intkey (i*1 key, i*1 aux)
  6497.    procedure fg_intkey (var key, aux : byte);
  6498.  
  6499. Description
  6500.  
  6501.    The fg_intkey routine reads the next entry from the BIOS keyboard buffer
  6502.    (without echo) and returns the keystroke's standard or extended keyboard
  6503.    code (a list of these appears in Chapter 14 of the Fastgraph User's Guide).
  6504.    It is similar to fg_getkey, but it does not wait for a keystroke if the
  6505.    keyboard buffer is empty.
  6506.  
  6507. Parameters
  6508.  
  6509.    key receives the keystroke's standard keyboard code if it represents a
  6510.    standard character.  If the keystroke represents an extended character, key
  6511.    will be set to zero.  In BASIC, you must explicitly declare key as a fixed-
  6512.    length string variable of length 1.
  6513.  
  6514.    aux receives the keystroke's extended keyboard code if it represents an
  6515.    extended character.  If the keystroke represents a standard character, aux
  6516.    will be set to zero.  In BASIC, you must explicitly declare aux as a fixed-
  6517.    length string variable of length 1.
  6518.  
  6519.    If the BIOS keyboard buffer is empty, both key and aux will be set to zero.
  6520.  
  6521. Return value
  6522.  
  6523.    none
  6524.  
  6525. Restrictions
  6526.  
  6527.    none
  6528.  
  6529. See also
  6530.  
  6531.    fg_getkey, fg_intjoy, fg_kbtest, fg_waitkey
  6532.  
  6533. Examples
  6534.  
  6535.    14-2, 15-7, 16-1, 16-3
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.                                      106
  6549. fg_justify
  6550.  
  6551. Prototype
  6552.  
  6553.    void fg_justify (int xjust, int yjust);
  6554.    sub FGjustify (xjust%, yjust%)
  6555.    subroutine fg_justify (i*2 xjust, i*2 yjust)
  6556.    procedure fg_justify (xjust, yjust : integer);
  6557.  
  6558. Description
  6559.  
  6560.    The fg_justify routine defines the horizontal and vertical justification
  6561.    settings for strings displayed with the fg_print routine.
  6562.  
  6563. Parameters
  6564.  
  6565.    xjust defines the horizontal justification.  If xjust is -1, strings will
  6566.    be displayed left justified relative to the current graphics x position.
  6567.    If xjust is 0, strings will be centered about the x position.  If xjust is
  6568.    1, strings will be right justified.
  6569.  
  6570.    yjust defines the vertical justification.  If yjust is -1, the bottom of
  6571.    the characters will be the current graphics y position.  If yjust is 0,
  6572.    strings will be centered about the y position.  If yjust is 1, the top of
  6573.    the characters will be at the y position.
  6574.  
  6575. Return value
  6576.  
  6577.    none
  6578.  
  6579. Restrictions
  6580.  
  6581.    The values of xjust and yjust must be -1, 0, or 1.
  6582.  
  6583. See also
  6584.  
  6585.    fg_print
  6586.  
  6587. Examples
  6588.  
  6589.    7-6
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.                                      107
  6608. fg_kbinit
  6609.  
  6610. Prototype
  6611.  
  6612.    void fg_kbinit (int state);
  6613.    sub FGkbinit (state%)
  6614.    subroutine fg_kbinit (i*2 state)
  6615.    procedure fg_kbinit (state : integer);
  6616.  
  6617. Description
  6618.  
  6619.    The fg_kbinit routine enables or disables the Fastgraph low-level keyboard
  6620.    handler.  If the keyboard handler is already in the requested state,
  6621.    nothing happens.
  6622.  
  6623. Parameters
  6624.  
  6625.    state is a flag specifying if the keyboard handler is to be enabled (state
  6626.    = 1) or disabled (state = 0).
  6627.  
  6628. Return value
  6629.  
  6630.    none
  6631.  
  6632. Restrictions
  6633.  
  6634.    When the low-level keyboard handler is enabled, it is not possible to use
  6635.    fg_getkey, fg_intkey, fg_waitkey, or any third party functions that use
  6636.    BIOS or DOS services to access the keyboard.
  6637.  
  6638. See also
  6639.  
  6640.    fg_kbtest
  6641.  
  6642. Examples
  6643.  
  6644.    14-5
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.                                      108
  6667. fg_kbtest
  6668.  
  6669. Prototype
  6670.  
  6671.    int fg_kbtest (int scan_code);
  6672.    function FGkbtest% (scan_code%)
  6673.    i*2 function fg_kbtest (i*2 scan_code)
  6674.    function fg_kbtest (scan_code : integer) : integer;
  6675.  
  6676. Description
  6677.  
  6678.    The fg_kbtest routine determines if the key having the specified scan code
  6679.    is now pressed or released.
  6680.  
  6681. Parameters
  6682.  
  6683.    scan_code is the scan code of the key to check.  Refer to the Fastgraph
  6684.    User's Guide for a list of scan codes.
  6685.  
  6686. Return value
  6687.  
  6688.    0 = key is released
  6689.    1 = key is pressed
  6690.  
  6691. Restrictions
  6692.  
  6693.    The low-level keyboard handler must be enabled for fg_kbtest to work
  6694.    properly.
  6695.  
  6696. See also
  6697.  
  6698.    fg_kbinit
  6699.  
  6700. Examples
  6701.  
  6702.    14-5
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709.  
  6710.  
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.                                      109
  6726. fg_locate
  6727.  
  6728. Prototype
  6729.  
  6730.    void fg_locate (int row, int column);
  6731.    sub FGlocate (row%, column%)
  6732.    subroutine fg_locate (i*2 row, i*2 column)
  6733.    procedure fg_locate (row, column : integer);
  6734.  
  6735. Description
  6736.  
  6737.    The fg_locate routine changes the text cursor position for the active
  6738.    display page.  The fg_setmode routine sets each page's text cursor position
  6739.    to (0,0).
  6740.  
  6741. Parameters
  6742.  
  6743.    row is the text cursor's destination row number, between 0 and one less
  6744.    than the number of character rows available.
  6745.  
  6746.    column is text cursor's destination column number, between 0 and one less
  6747.    than the number of character columns available.
  6748.  
  6749. Return value
  6750.  
  6751.    none
  6752.  
  6753. Restrictions
  6754.  
  6755.    The first eight video pages (0 to 7) each have their own text cursor.  Each
  6756.    subsequent group of 8 video pages (pages 8 through 15, pages 16 to 23, and
  6757.    so forth) respectively share the same text cursor positions as the first 8
  6758.    pages.  For example, changing the text cursor position on video page 9 also
  6759.    changes its position on video page 1.
  6760.  
  6761. See also
  6762.  
  6763.    fg_where
  6764.  
  6765. Examples
  6766.  
  6767.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  6768.  
  6769.  
  6770.  
  6771.  
  6772.  
  6773.  
  6774.  
  6775.  
  6776.  
  6777.  
  6778.  
  6779.  
  6780.  
  6781.  
  6782.  
  6783.  
  6784.                                      110
  6785. fg_makegif
  6786.  
  6787. Prototype
  6788.  
  6789.    int fg_makegif (int minx, int maxx, int miny, int maxy, char *filename);
  6790.    function FGmakegif% (minx%, maxx%, miny%, maxy%, filename$)
  6791.    i*2 function fg_makegif (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6792.      c*(*) filename)
  6793.    function fg_makegif (minx, maxx, miny, maxy : integer; filename : string) :
  6794.      integer;
  6795.  
  6796. Description
  6797.  
  6798.    The fg_makegif routine creates a GIF file from the specified rectangular
  6799.    region of the active video page.  The region's extremes are expressed in
  6800.    screen space units.
  6801.  
  6802. Parameters
  6803.  
  6804.    minx is the x coordinate of the region's left edge.
  6805.  
  6806.    maxx is the x coordinate of the region's right edge.  It must be greater
  6807.    than or equal to minx.
  6808.  
  6809.    miny is the y coordinate of the region's top edge.
  6810.  
  6811.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6812.    than or equal to miny.
  6813.  
  6814.    filename is the name of the GIF file to create.  A device and path name may
  6815.    be included as part of the file name.  The file name must be terminated by
  6816.    a null character (that is, a zero byte).  If an identically named file
  6817.    already exists, it is overwritten.
  6818.  
  6819. Return value
  6820.  
  6821.    0 = success
  6822.    1 = file not created
  6823.  
  6824. Restrictions
  6825.  
  6826.    The fg_makegif routine has no effect in text video modes, or in the CGA and
  6827.    Hercules graphics modes.
  6828.  
  6829.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  6830.    graphics modes (modes 13 through 16), the palette registers are not
  6831.    readable.  Hence, fg_makegif will use the default palette settings when
  6832.    used in these video modes on Tandy or EGA systems.
  6833.  
  6834. See also
  6835.  
  6836.    fg_imagebuf, fg_makepcx, fg_makeppr, fg_makespr, fg_showgif
  6837.  
  6838. Examples
  6839.  
  6840.    9-3
  6841.  
  6842.  
  6843.                                      111
  6844. fg_makepcx
  6845.  
  6846. Prototype
  6847.  
  6848.    int fg_makepcx (int minx, int maxx, int miny, int maxy, char *filename);
  6849.    function FGmakepcx% (minx%, maxx%, miny%, maxy%, filename$)
  6850.    i*2 function fg_makepcx (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6851.      c*(*) filename)
  6852.    function fg_makepcx (minx, maxx, miny, maxy : integer; filename : string) :
  6853.      integer;
  6854.  
  6855. Description
  6856.  
  6857.    The fg_makepcx routine creates a PCX file from the specified rectangular
  6858.    region of the active video page.  The region's extremes are expressed in
  6859.    screen space units.
  6860.  
  6861. Parameters
  6862.  
  6863.    minx is the x coordinate of the region's left edge.  Its value is reduced
  6864.    to a byte boundary if necessary.
  6865.  
  6866.    maxx is the x coordinate of the region's right edge.  It must be greater
  6867.    than or equal to minx.
  6868.  
  6869.    miny is the y coordinate of the region's top edge.
  6870.  
  6871.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6872.    than or equal to miny.
  6873.  
  6874.    filename is the name of the PCX file to create.  A device and path name may
  6875.    be included as part of the file name.  The file name must be terminated by
  6876.    a null character (that is, a zero byte).  If an identically named file
  6877.    already exists, it is overwritten.
  6878.  
  6879. Return value
  6880.  
  6881.    0 = success
  6882.    1 = file not created
  6883.  
  6884. Restrictions
  6885.  
  6886.    The fg_makepcx routine has no effect in text video modes or in the Hercules
  6887.    low-resolution graphics mode.  Refer to the description of the fg_showpcx
  6888.    routine for information about PCX file compatibility between different
  6889.    video modes.
  6890.  
  6891.    In the Tandy/PCjr 16-color graphics mode (mode 9) and the native EGA
  6892.    graphics modes (modes 13 through 16), the palette registers are not
  6893.    readable.  Hence, fg_makepcx will use the default palette settings when
  6894.    used in these video modes on Tandy or EGA systems.
  6895.  
  6896. See also
  6897.  
  6898.    fg_imagebuf, fg_makegif, fg_makespr, fg_makeppr, fg_showpcx
  6899.  
  6900.  
  6901.  
  6902.                                      112
  6903. fg_makepcx (continued)
  6904.  
  6905. Examples
  6906.  
  6907.    9-1
  6908.  
  6909.  
  6910.  
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.  
  6935.  
  6936.  
  6937.  
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.  
  6953.  
  6954.  
  6955.  
  6956.  
  6957.  
  6958.  
  6959.  
  6960.  
  6961.                                      113
  6962. fg_makeppr
  6963.  
  6964. Prototype
  6965.  
  6966.    int fg_makeppr (int minx, int maxx, int miny, int maxy, char *filename);
  6967.    function FGmakeppr% (minx%, maxx%, miny%, maxy%, filename$)
  6968.    i*2 function fg_makeppr (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  6969.      c*(*) filename)
  6970.    function fg_makeppr (minx, maxx, miny, maxy : integer; filename : string) :
  6971.      integer;
  6972.  
  6973. Description
  6974.  
  6975.    The fg_makeppr routine creates a packed pixel run (PPR) file from the
  6976.    specified rectangular region of the active video page.  The region's
  6977.    extremes are expressed in screen space units.
  6978.  
  6979. Parameters
  6980.  
  6981.    minx is the x coordinate of the region's left edge.  Its value is reduced
  6982.    to a byte boundary if necessary.
  6983.  
  6984.    maxx is the x coordinate of the region's right edge.  It must be greater
  6985.    than or equal to minx.
  6986.  
  6987.    miny is the y coordinate of the region's top edge.
  6988.  
  6989.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  6990.    than or equal to miny.
  6991.  
  6992.    filename is the name of the PPR file to create.  A device and path name may
  6993.    be included as part of the file name.  The file name must be terminated by
  6994.    a null character (that is, a zero byte).  If an identically named file
  6995.    already exists, it is overwritten.
  6996.  
  6997. Return value
  6998.  
  6999.    0 = success
  7000.    1 = file not created
  7001.  
  7002. Restrictions
  7003.  
  7004.    This routine has no effect in text video modes.
  7005.  
  7006. See also
  7007.  
  7008.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makespr, fg_showppr
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.                                      114
  7021. fg_makespr
  7022.  
  7023. Prototype
  7024.  
  7025.    int fg_makespr (int minx, int maxx, int miny, int maxy, char *filename);
  7026.    function FGmakespr% (minx%, maxx%, miny%, maxy%, filename$)
  7027.    i*2 function fg_makespr (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy,
  7028.      c*(*) filename)
  7029.    function fg_makespr (minx, maxx, miny, maxy : integer; filename : string) :
  7030.      integer;
  7031.  
  7032. Description
  7033.  
  7034.    The fg_makespr routine creates a standard pixel run (SPR) file from the
  7035.    specified rectangular region of the active video page.  The region's
  7036.    extremes are expressed in screen space units.
  7037.  
  7038. Parameters
  7039.  
  7040.    minx is the x coordinate of the region's left edge.  Its value is reduced
  7041.    to a byte boundary if necessary.
  7042.  
  7043.    maxx is the x coordinate of the region's right edge.  It must be greater
  7044.    than or equal to minx.
  7045.  
  7046.    miny is the y coordinate of the region's top edge.
  7047.  
  7048.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  7049.    than or equal to miny.
  7050.  
  7051.    filename is the name of the SPR file to create.  A device and path name may
  7052.    be included as part of the file name.  The file name must be terminated by
  7053.    a null character (that is, a zero byte).  If an identically named file
  7054.    already exists, it is overwritten.
  7055.  
  7056. Return value
  7057.  
  7058.    0 = success
  7059.    1 = file not created
  7060.  
  7061. Restrictions
  7062.  
  7063.    This routine has no effect in text video modes.
  7064.  
  7065. See also
  7066.  
  7067.    fg_imagebuf, fg_makegif, fg_makepcx, fg_makeppr, fg_showspr
  7068.  
  7069. Examples
  7070.  
  7071.    9-4
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.                                      115
  7080. fg_maprgb
  7081.  
  7082. Prototype
  7083.  
  7084.    int fg_maprgb (int red, int green, int blue);
  7085.    function FGmaprgb% (red%, green%, blue%)
  7086.    i*2 function fg_maprgb (i*2 red, i*2 green, i*2 blue)
  7087.    function fg_maprgb (red, green, blue : integer) : integer;
  7088.  
  7089. Description
  7090.  
  7091.    The fg_maprgb routine maps six-bit red, green, and blue color components
  7092.    into a suitable palette value for the current video mode.  You can then
  7093.    pass this value to the fg_palette routine.
  7094.  
  7095. Parameters
  7096.  
  7097.    red, green, and blue respectively specify the color's red, green, and blue
  7098.    components.  These values must be between 0 and 63; increasing values
  7099.    produce more intense colors.
  7100.  
  7101. Return value
  7102.  
  7103.    The mode-specific palette value for the specified color components.
  7104.  
  7105. Restrictions
  7106.  
  7107.    This routine is meaningful only in 16-color graphics video modes.
  7108.  
  7109. See also
  7110.  
  7111.    fg_palette, fg_palettes, fg_setrgb
  7112.  
  7113. Examples
  7114.  
  7115.    5-13
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.  
  7137.  
  7138.                                      116
  7139. fg_measure
  7140.  
  7141. Prototype
  7142.  
  7143.    int fg_measure (void);
  7144.    function FGmeasure% ()
  7145.    i*2 function fg_measure ()
  7146.    function fg_measure : integer;
  7147.  
  7148. Description
  7149.  
  7150.    The fg_measure routine returns the approximate number of delay units per
  7151.    clock tick.  This quantity is proportional to the system's processor speed.
  7152.    Delay units are used by the fg_stall routine.
  7153.  
  7154. Parameters
  7155.  
  7156.    none
  7157.  
  7158. Return value
  7159.  
  7160.    The approximate number of delay units per clock tick.  Typical values for
  7161.    some common systems are:
  7162.  
  7163.                  system            delay units
  7164.                   type           per clock tick
  7165.  
  7166.               Tandy 1000 HX            280
  7167.               25 MHz 80386            3,400
  7168.               40 MHz 80386            7,100
  7169.  
  7170. Restrictions
  7171.  
  7172.    none
  7173.  
  7174. See also
  7175.  
  7176.    fg_stall
  7177.  
  7178. Examples
  7179.  
  7180.    16-3
  7181.  
  7182.  
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.                                      117
  7198. fg_memavail
  7199.  
  7200. Prototype
  7201.  
  7202.    long fg_memavail (void);
  7203.    function FGmemavail& ()
  7204.    i*4 function fg_memavail ()
  7205.    function fg_memavail : longint;
  7206.  
  7207. Description
  7208.  
  7209.    The fg_memavail routine determines the amount of conventional memory
  7210.    available to DOS.
  7211.  
  7212. Parameters
  7213.  
  7214.    none
  7215.  
  7216. Return value
  7217.  
  7218.    The amount of conventional memory (in bytes) available to DOS.
  7219.  
  7220. Restrictions
  7221.  
  7222.    none
  7223.  
  7224. Examples
  7225.  
  7226.    17-1
  7227.  
  7228.  
  7229.  
  7230.  
  7231.  
  7232.  
  7233.  
  7234.  
  7235.  
  7236.  
  7237.  
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.                                      118
  7257. fg_memory
  7258.  
  7259. Prototype
  7260.  
  7261.    int fg_memory (void);
  7262.    function FGmemory% ()
  7263.    i*2 function fg_memory ()
  7264.    function fg_memory : integer;
  7265.  
  7266. Description
  7267.  
  7268.    The fg_memory routine returns the amount of video memory present (in
  7269.    kilobytes) on the user's SVGA card.
  7270.  
  7271. Parameters
  7272.  
  7273.    none
  7274.  
  7275. Return value
  7276.  
  7277.    The amount of video memory in kilobytes.  For example, if the user's SVGA
  7278.    card has 1MB of video memory installed, the return value will be 1,024.
  7279.  
  7280. Restrictions
  7281.  
  7282.    This routine is only meaningful after successfully initializing Fastgraph's
  7283.    SVGA kernel with fg_svgainit.
  7284.  
  7285. See also
  7286.  
  7287.    fg_svgainit
  7288.  
  7289. Examples
  7290.  
  7291.    3-9
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.                                      119
  7316. fg_mousebut
  7317.  
  7318. Prototype
  7319.  
  7320.    void fg_mousebut (int number, int *count, int *lastx, int *lasty);
  7321.    sub FGmousebut (number%, count%, lastx%, lasty%)
  7322.    subroutine fg_mousebut (i*2 number, i*2 count, i*2 lastx, i*2 lasty)
  7323.    procedure fg_mousebut (number : integer; var count, lastx, lasty :
  7324. integer);
  7325.  
  7326. Description
  7327.  
  7328.    The fg_mousebut routine returns information about mouse button press or
  7329.    release counts, as well as the mouse cursor position at the time of the
  7330.    last button press or release.
  7331.  
  7332. Parameters
  7333.  
  7334.    number is the mouse button for which to report information (1 means the
  7335.    left button, 2 the right button, and 3 the middle button).  If number is
  7336.    positive, button press counts will be reported.  If it is negative, release
  7337.    counts will be reported.
  7338.  
  7339.    count receives the number of press or release counts for the requested
  7340.    button since the last check, or since calling the fg_mouseini routine.
  7341.  
  7342.    lastx receives the x coordinate (in screen space) of the mouse cursor
  7343.    position at the time of the last press or release of the requested button.
  7344.    If count is zero, lastx is also set to zero.
  7345.  
  7346.    lasty receives the y coordinate (in screen space) of the mouse cursor
  7347.    position at the time of the last press or release of the requested button.
  7348.    If count is zero, lasty is also set to zero.
  7349.  
  7350. Return value
  7351.  
  7352.    none
  7353.  
  7354. Restrictions
  7355.  
  7356.    none
  7357.  
  7358. See also
  7359.  
  7360.    fg_mousepos
  7361.  
  7362. Examples
  7363.  
  7364.    14-8
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.                                      120
  7375. fg_mousecur
  7376.  
  7377. Prototype
  7378.  
  7379.    void fg_mousecur (int screen_mask, int cursor_mask);
  7380.    sub FGmousecur (screen_mask%, cursor_mask%)
  7381.    subroutine fg_mousecur (i*2 screen_mask, i*2 cursor_mask)
  7382.    procedure fg_mousecur (screen_mask, cursor_mask : integer);
  7383.  
  7384. Description
  7385.  
  7386.    The fg_mousecur routine defines the appearance of the mouse cursor in text
  7387.    video modes.  Refer to Chapter 14 of the Fastgraph User's Guide for
  7388.    complete information about defining the mouse cursor in text modes.
  7389.  
  7390. Parameters
  7391.  
  7392.    screen_mask defines the screen mask.  When you position the mouse over a
  7393.    specific character cell, the mouse driver logically ANDs the screen mask
  7394.    with the existing contents of that cell.
  7395.  
  7396.    cursor_mask defines the cursor mask.  After logically ANDing the screen
  7397.    mask with the contents of a character cell, the mouse driver XORs the
  7398.    cursor mask with the result to produce the mouse cursor.
  7399.  
  7400.    The binary structure of screen_mask and cursor_mask is:
  7401.  
  7402.                          bits      meaning
  7403.  
  7404.                          0 to 7    ASCII character value
  7405.                          8 to 11   foreground color
  7406.                          12 to 14  background color
  7407.                          15        blink
  7408.  
  7409. Return value
  7410.  
  7411.    none
  7412.  
  7413. Restrictions
  7414.  
  7415.    This routine has no effect in graphics video modes.
  7416.  
  7417. See also
  7418.  
  7419.    fg_mouseini, fg_mouseptr, fg_mousevis
  7420.  
  7421. Examples
  7422.  
  7423.    14-9
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.                                      121
  7434. fg_mousefin
  7435.  
  7436. Prototype
  7437.  
  7438.    void fg_mousefin (void);
  7439.    sub FGmousefin ()
  7440.    subroutine fg_mousefin ()
  7441.    procedure fg_mousefin;
  7442.  
  7443. Description
  7444.  
  7445.    The fg_mousefin routine unhooks Fastgraph's XVGA or SVGA mouse handler from
  7446.    the mouse driver.  This routine should be used just before reverting to a
  7447.    text mode in programs that have called fg_mouseini in XVGA or SVGA graphics
  7448.    modes.
  7449.  
  7450. Parameters
  7451.  
  7452.    none
  7453.  
  7454. Return value
  7455.  
  7456.    none
  7457.  
  7458. Restrictions
  7459.  
  7460.    This routine is only meaningful in XVGA and SVGA graphics modes.
  7461.  
  7462. See also
  7463.  
  7464.    fg_mouseini
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.  
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.                                      122
  7493. fg_mouseini
  7494.  
  7495. Prototype
  7496.  
  7497.    int fg_mouseini (void);
  7498.    function FGmouseini% ()
  7499.    i*2 function fg_mouseini ()
  7500.    function fg_mouseini : integer;
  7501.  
  7502. Description
  7503.  
  7504.    The fg_mouseini routine initializes the mouse and must be called before any
  7505.    of Fastgraph's other mouse support routines.
  7506.  
  7507. Parameters
  7508.  
  7509.    none
  7510.  
  7511. Return value
  7512.  
  7513.    If the return value is positive, it indicates the number of buttons on the
  7514.    mouse being used (2 or 3).  If the return value is -1, it means the
  7515.    initialization failed because the mouse driver has not been loaded or the
  7516.    mouse is not physically connected.
  7517.  
  7518. Restrictions
  7519.  
  7520.    none
  7521.  
  7522. See also
  7523.  
  7524.    fg_mousebut, fg_mousecur, fg_mousefin, fg_mouselim, fg_mousemov,
  7525.    fg_mousepos, fg_mouseptr, fg_mousespd, fg_mousevis, fg_resize
  7526.  
  7527. Examples
  7528.  
  7529.    14-6, 14-7, 14-8, 14-9, 14-10
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.                                      123
  7552. fg_mouselim
  7553.  
  7554. Prototype
  7555.  
  7556.    void fg_mouselim (int minx, int maxx, int miny, int maxy);
  7557.    sub FGmouselim (minx%, maxx%, miny%, maxy%)
  7558.    subroutine fg_mouselim (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  7559.    procedure fg_mouselim (minx, maxx, miny, maxy : integer);
  7560.  
  7561. Description
  7562.  
  7563.    The fg_mouselim routine defines the rectangular area in which the mouse
  7564.    cursor may move.  In graphics modes, the area is defined in screen space
  7565.    coordinates.  In text modes, it is defined in rows and columns.
  7566.  
  7567. Parameters
  7568.  
  7569.    minx is the x coordinate of the area's left edge.
  7570.  
  7571.    maxx is the x coordinate of the area's right edge.  It must be greater than
  7572.    or equal to the value of minx.
  7573.  
  7574.    miny is the y coordinate of the area's top edge.
  7575.  
  7576.    maxy is the y coordinate of the area's bottom edge.  It must be greater
  7577.    than or equal to the value of miny.
  7578.  
  7579. Return value
  7580.  
  7581.    none
  7582.  
  7583. Restrictions
  7584.  
  7585.    none
  7586.  
  7587. See also
  7588.  
  7589.    fg_mouseini, fg_mousemov
  7590.  
  7591. Examples
  7592.  
  7593.    14-7
  7594.  
  7595.  
  7596.  
  7597.  
  7598.  
  7599.  
  7600.  
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.                                      124
  7611. fg_mousemov
  7612.  
  7613. Prototype
  7614.  
  7615.    void fg_mousemov (int ix, int iy);
  7616.    sub FGmousemov (ix%, iy%)
  7617.    subroutine fg_mousemov (i*2 ix, i*2 iy)
  7618.    procedure fg_mousemov (ix, iy : integer);
  7619.  
  7620. Description
  7621.  
  7622.    The fg_mousemov routine moves the mouse cursor to the specified character
  7623.    cell (in text modes) or screen space position (in graphics modes).  The
  7624.    mouse cursor is moved whether or not it is currently visible.
  7625.  
  7626. Parameters
  7627.  
  7628.    ix is the x coordinate of the new mouse cursor position.
  7629.  
  7630.    iy is the y coordinate of the new mouse cursor position.
  7631.  
  7632. Return value
  7633.  
  7634.    none
  7635.  
  7636. Restrictions
  7637.  
  7638.    If you attempt to move the mouse cursor outside the area defined by
  7639.    fg_mouselim, the fg_mousemov routine just positions the cursor at the
  7640.    nearest point possible within that area.
  7641.  
  7642. See also
  7643.  
  7644.    fg_mouseini, fg_mouselim
  7645.  
  7646. Examples
  7647.  
  7648.    14-7
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.                                      125
  7670. fg_mousepos
  7671.  
  7672. Prototype
  7673.  
  7674.    void fg_mousepos (int *ix, int *iy, int *buttons);
  7675.    sub FGmousepos (ix%, iy%, buttons%)
  7676.    subroutine fg_mousepos (i*2 ix, i*2 iy, i*2 buttons)
  7677.    procedure fg_mousepos (var ix, iy, buttons : integer);
  7678.  
  7679. Description
  7680.  
  7681.    The fg_mousepos routine returns the current mouse position and button
  7682.    status.  In graphics modes, the position is defined in screen space
  7683.    coordinates.  In text modes, it is defined in rows and columns.
  7684.  
  7685. Parameters
  7686.  
  7687.    ix receives the x coordinate of the mouse cursor position.
  7688.  
  7689.    iy receives the y coordinate of the mouse cursor position.
  7690.  
  7691.    buttons receives a bit mask representing the button status, where each bit
  7692.    is set if the corresponding button is pressed.  Bit 0 corresponds to the
  7693.    left button, bit 1 to the right button, and bit 2 to the middle button.
  7694.  
  7695. Return value
  7696.  
  7697.    none
  7698.  
  7699. Restrictions
  7700.  
  7701.    none
  7702.  
  7703. See also
  7704.  
  7705.    fg_mousebut, fg_mouseini
  7706.  
  7707. Examples
  7708.  
  7709.    14-8
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.  
  7719.  
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.                                      126
  7729. fg_mouseptr
  7730.  
  7731. Prototype
  7732.  
  7733.    void fg_mouseptr (int *masks, int xoffset, int yoffset);
  7734.    sub FGmouseptr (masks%(), xoffset%, yoffset%)
  7735.    subroutine fg_mouseptr (i*2 masks, i*2 xoffset, i*2 yoffset)
  7736.    procedure fg_mouseptr (var masks : integer; xoffset, yoffset : integer);
  7737.  
  7738. Description
  7739.  
  7740.    The fg_mouseptr routine defines the shape and appearance of the mouse
  7741.    cursor in graphics video modes.  Refer to Chapter 14 of the Fastgraph
  7742.    User's Guide for complete information about defining the mouse cursor in
  7743.    graphics modes.
  7744.  
  7745. Parameters
  7746.  
  7747.    masks is a 32-element array containing the 16-element screen mask followed
  7748.    by the 16-element cursor mask.  The mouse driver displays the mouse cursor
  7749.    by logically ANDing video memory with the screen mask, and then XORing that
  7750.    result with the cursor mask.  The first item of each mask corresponds to
  7751.    the top row of the mouse cursor.  The following table summarizes the cursor
  7752.    appearance for all possible combinations of mask bits.
  7753.  
  7754.         screen mask bit   cursor mask bit  resulting cursor pixel
  7755.  
  7756.                0                 0                black
  7757.                0                 1                white
  7758.                1                 0              unchanged
  7759.                1                 1              inverted
  7760.  
  7761.    xoffset is the x coordinate of the "hot spot" relative to the upper left
  7762.    corner of the mouse cursor.
  7763.  
  7764.    yoffset is the y coordinate of the "hot spot" relative to the upper left
  7765.    corner of the mouse cursor.
  7766.  
  7767. Return value
  7768.  
  7769.    none
  7770.  
  7771. Restrictions
  7772.  
  7773.    This routine has no effect in text video modes.
  7774.  
  7775. See also
  7776.  
  7777.    fg_mousecur, fg_mouseini, fg_mousevis
  7778.  
  7779. Examples
  7780.  
  7781.    14-10
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.                                      127
  7788. fg_mousespd
  7789.  
  7790. Prototype
  7791.  
  7792.    void fg_mousespd (int xmickeys, int ymickeys);
  7793.    sub FGmousespd (xmickeys%, ymickeys%)
  7794.    subroutine fg_mousespd (i*2 xmickeys, i*2 ymickeys)
  7795.    procedure fg_mousespd (xmickeys, ymickeys : integer);
  7796.  
  7797. Description
  7798.  
  7799.    The fg_mousespd routine defines the number of mickey units per eight pixels
  7800.    of cursor movement (one mickey unit equals 1/200 of an inch).  This
  7801.    effectively controls the speed at which the mouse cursor moves relative to
  7802.    the movement of the mouse itself.
  7803.  
  7804. Parameters
  7805.  
  7806.    xmickeys is the number of mickey units per eight pixels of horizontal mouse
  7807.    cursor movement (the default is 8).
  7808.  
  7809.    ymickeys is the number of mickey units per eight pixels of vertical mouse
  7810.    cursor movement (the default is 16).
  7811.  
  7812. Return value
  7813.  
  7814.    none
  7815.  
  7816. Restrictions
  7817.  
  7818.    none
  7819.  
  7820. See also
  7821.  
  7822.    fg_mouseini
  7823.  
  7824. Examples
  7825.  
  7826.    14-7
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.                                      128
  7847. fg_mousevis
  7848.  
  7849. Prototype
  7850.  
  7851.    void fg_mousevis (int state);
  7852.    sub FGmousevis (state%)
  7853.    subroutine fg_mousevis (i*2 state)
  7854.    procedure fg_mousevis (state : integer);
  7855.  
  7856. Description
  7857.  
  7858.    The fg_mousevis routine makes the mouse cursor visible or invisible.  After
  7859.    calling fg_mouseini, the mouse cursor is invisible.
  7860.  
  7861. Parameters
  7862.  
  7863.    state defines the mouse cursor visibility.  If state is 0, the mouse cursor
  7864.    is made invisible.  If it is 1, the mouse cursor is made visible.
  7865.  
  7866. Return value
  7867.  
  7868.    none
  7869.  
  7870. Restrictions
  7871.  
  7872.    none
  7873.  
  7874. See also
  7875.  
  7876.    fg_mouseini
  7877.  
  7878. Examples
  7879.  
  7880.    14-7, 14-8, 14-9, 14-10
  7881.  
  7882.  
  7883.  
  7884.  
  7885.  
  7886.  
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.                                      129
  7906. fg_move
  7907.  
  7908. Prototype
  7909.  
  7910.    void fg_move (int ix, int iy);
  7911.    sub FGmove (ix%, iy%)
  7912.    subroutine fg_move (i*2 ix, i*2 iy)
  7913.    procedure fg_move (ix, iy : integer);
  7914.  
  7915. Description
  7916.  
  7917.    The fg_move routine establishes the graphics cursor position at an absolute
  7918.    screen space point.  The fg_setmode routine sets the graphics cursor
  7919.    position to (0,0).
  7920.  
  7921. Parameters
  7922.  
  7923.    ix is the screen space x coordinate of the graphics cursor's new position.
  7924.  
  7925.    iy is the screen space y coordinate of the graphics cursor's new position.
  7926.  
  7927. Return value
  7928.  
  7929.    none
  7930.  
  7931. Restrictions
  7932.  
  7933.    This routine has no effect in text video modes.
  7934.  
  7935. See also
  7936.  
  7937.    fg_moverel, fg_moverw, fg_movew
  7938.  
  7939. Examples
  7940.  
  7941.    6-2, 6-3, 6-5, 6-6, 6-10, 6-17, 7-6, 9-4, 9-5, 9-6, 10-1, 12-4, 12-5, 12-6,
  7942.    13-5, 13-6
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.                                      130
  7965. fg_moverel
  7966.  
  7967. Prototype
  7968.  
  7969.    void fg_moverel (int ix, int iy);
  7970.    sub FGmoverel (ix%, iy%)
  7971.    subroutine fg_moverel (i*2 ix, i*2 iy)
  7972.    procedure fg_moverel (ix, iy : integer);
  7973.  
  7974. Description
  7975.  
  7976.    The fg_moverel routine establishes the graphics cursor position at a screen
  7977.    space point relative to the current position.
  7978.  
  7979. Parameters
  7980.  
  7981.    ix is the screen space x offset of the graphics cursor's new position.
  7982.  
  7983.    iy is the screen space y offset of the graphics cursor's new position.
  7984.  
  7985. Return value
  7986.  
  7987.    none
  7988.  
  7989. Restrictions
  7990.  
  7991.    This routine has no effect in text video modes.
  7992.  
  7993. See also
  7994.  
  7995.    fg_move, fg_moverw, fg_movew
  7996.  
  7997. Examples
  7998.  
  7999.    6-3
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.  
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.  
  8015.  
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.                                      131
  8024. fg_moverw
  8025.  
  8026. Prototype
  8027.  
  8028.    void fg_moverw (double x, double y);
  8029.    sub FGmoverw (x#, y#)
  8030.    subroutine fg_moverw (r*8 x, r*8 y)
  8031.    procedure fg_moverw (x, y : real);
  8032.  
  8033. Description
  8034.  
  8035.    The fg_moverw routine establishes the graphics cursor position at a world
  8036.    space point relative to the current position.
  8037.  
  8038. Parameters
  8039.  
  8040.    x is the world space x offset of the graphics cursor's new position.
  8041.  
  8042.    y is the world space y offset of the graphics cursor's new position.
  8043.  
  8044. Return value
  8045.  
  8046.    none
  8047.  
  8048. Restrictions
  8049.  
  8050.    This routine is not available in Fastgraph/Light and has no effect in text
  8051.    video modes.
  8052.  
  8053. See also
  8054.  
  8055.    fg_move, fg_moverel, fg_movew
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.  
  8081.  
  8082.                                      132
  8083. fg_movew
  8084.  
  8085. Prototype
  8086.  
  8087.    void fg_movew (double x, double y);
  8088.    sub FGmovew (x#, y#)
  8089.    subroutine fg_movew (r*8 x, r*8 y)
  8090.    procedure fg_movew (x, y : real);
  8091.  
  8092. Description
  8093.  
  8094.    The fg_movew routine establishes the graphics cursor position at an
  8095.    absolute world space point.  The fg_initw routine sets the graphics cursor
  8096.    position to (0.0,0.0).
  8097.  
  8098. Parameters
  8099.  
  8100.    x is the world space x coordinate of the graphics cursor's new position.
  8101.  
  8102.    y is the world space y coordinate of the graphics cursor's new position.
  8103.  
  8104. Return value
  8105.  
  8106.    none
  8107.  
  8108. Restrictions
  8109.  
  8110.    This routine is not available in Fastgraph/Light and has no effect in text
  8111.    video modes.
  8112.  
  8113. See also
  8114.  
  8115.    fg_move, fg_moverel, fg_moverw
  8116.  
  8117. Examples
  8118.  
  8119.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.                                      133
  8142. fg_music
  8143.  
  8144. Prototype
  8145.  
  8146.    void fg_music (char *music_string);
  8147.    sub FGmusic (music_string$)
  8148.    subroutine fg_music (c*(*) music_string)
  8149.    procedure fg_music (music_string : string);
  8150.  
  8151. Description
  8152.  
  8153.    The fg_music routine uses the programmable timer to play a sequence of
  8154.    musical tones.
  8155.  
  8156. Parameters
  8157.  
  8158.    music_string is an arbitrary-length sequence of music commands, followed by
  8159.    a dollar-sign ($) terminator.  Music commands are summarized in the
  8160.    following table:
  8161.  
  8162. command      meaning
  8163.  
  8164. A thru G     Play the specified note in the current octave.
  8165.  
  8166. #            May be appended to a note character (A through G) to make that
  8167.              note sharp.
  8168.  
  8169. .            May be appended to a note character (A through G) or a sharp (#)
  8170.              to extend that note by half its normal length.  Multiple dots may
  8171.              be used, and each will again extend the note by half as much as
  8172.              the previous extension.
  8173.  
  8174. Ln           Set the length of subsequent notes and pauses.  The value of n is
  8175.              an integer between 1 and 64, where 1 indicates a whole note, 2 a
  8176.              half note, 4 a quarter note, and so forth.  If no L command is
  8177.              present, L4 is assumed.
  8178.  
  8179. On           Set the octave for subsequent notes.  The value of n may be an
  8180.              integer between 0 and 6 to set a specific octave.  It also can be
  8181.              a plus (+) or minus (-) character to increment or decrement the
  8182.              current octave number.  Octave 4 contains middle C, and if no O
  8183.              command is present, O4 is assumed.
  8184.  
  8185. P            Pause (rest) for the duration specified by the most recent L
  8186.              command.
  8187.  
  8188. Sn           Set the amount of silence between notes.  The value of n is an
  8189.              integer between 0 and 2.  If n is 0, each note plays for the full
  8190.              period set by the L command (music legato).  If n is 1, each note
  8191.              plays for 7/8 the period set by the L command (music normal).  If
  8192.              n is 2, each note plays for 3/4 the period set by the L command
  8193.              (music staccato).  If no S command is present, S1 is assumed.
  8194.  
  8195. Tn           Set the tempo of the music (the number of quarter notes per
  8196.              minute).  The value of n is an integer between 32 and 255.  If no
  8197.              T command is present, T120 is assumed.
  8198.  
  8199.  
  8200.                                      134
  8201. fg_music (continued)
  8202.  
  8203. Parameters (continued)
  8204.  
  8205.    The fg_music routine ignores any other characters in music_string.  It also
  8206.    ignores command values outside the allowable range, such as T20 or O8.
  8207.  
  8208. Return value
  8209.  
  8210.    none
  8211.  
  8212. Restrictions
  8213.  
  8214.    This routine has no effect if there is asynchronous sound in progress.
  8215.  
  8216. See also
  8217.  
  8218.    fg_musicb
  8219.  
  8220. Examples
  8221.  
  8222.    15-3
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.                                      135
  8260. fg_musicb
  8261.  
  8262. Prototype
  8263.  
  8264.    void fg_musicb (char *music_string, int ntimes);
  8265.    sub FGmusicb (music_string$, ntimes%)
  8266.    subroutine fg_musicb (c*(*) music_string, i*2 ntimes)
  8267.    procedure fg_musicb (music_string : string; ntimes : integer);
  8268.  
  8269. Description
  8270.  
  8271.    The fg_musicb routine uses the programmable timer to play a sequence of
  8272.    musical tones, concurrent with other activity.
  8273.  
  8274. Parameters
  8275.  
  8276.    music_string is an arbitrary-length sequence of music commands, followed by
  8277.    a dollar-sign ($) terminator.  Refer to the description of the fg_music
  8278.    routine for a complete list of music commands.
  8279.  
  8280.    ntimes specifies the number of times to cycle through the music commands in
  8281.    music_string.  If ntimes is negative, the music will play repetitively
  8282.    until you stop it with the fg_hush or fg_hushnext routine.
  8283.  
  8284. Return value
  8285.  
  8286.    none
  8287.  
  8288. Restrictions
  8289.  
  8290.    This routine has no effect if there is asynchronous sound already in
  8291.    progress.  To allow for fast-tempo music, Fastgraph temporarily quadruples
  8292.    the clock tick interrupt rate from 18.2 to 72.8 ticks per second while
  8293.    producing asynchronous sound.  Because many disk controllers rely on the
  8294.    18.2 tick per second clock rate to synchronize disk accesses, your programs
  8295.    should not perform any disk operations when asynchronous sound is in
  8296.    progress.
  8297.  
  8298. See also
  8299.  
  8300.    fg_hush, fg_hushnext, fg_music, fg_playing, fg_resume, fg_suspend
  8301.  
  8302. Examples
  8303.  
  8304.    15-6, 15-7, 15-8
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.                                      136
  8319. fg_numlock
  8320.  
  8321. Prototype
  8322.  
  8323.    int fg_numlock (void);
  8324.    function FGnumlock% ()
  8325.    i*2 function fg_numlock ()
  8326.    function fg_numlock : integer;
  8327.  
  8328. Description
  8329.  
  8330.    The fg_numlock routine determines the state of the NumLock key.
  8331.  
  8332. Parameters
  8333.  
  8334.    none
  8335.  
  8336. Return value
  8337.  
  8338.    If the return value is 0, it means the NumLock key is off.  If it is 1, it
  8339.    means the NumLock key is on.
  8340.  
  8341. Restrictions
  8342.  
  8343.    none
  8344.  
  8345. See also
  8346.  
  8347.    fg_capslock, fg_scrlock, fg_setcaps, fg_setnum
  8348.  
  8349. Examples
  8350.  
  8351.    14-3
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.                                      137
  8378. fg_pagesize
  8379.  
  8380. Prototype
  8381.  
  8382.    long fg_pagesize (void);
  8383.    function FGpagesize& ()
  8384.    i*4 function fg_pagesize ();
  8385.    function fg_pagesize : longint;
  8386.  
  8387. Description
  8388.  
  8389.    The fg_pagesize routine returns the video page size in bytes for the
  8390.    current video mode.
  8391.  
  8392. Parameters
  8393.  
  8394.    none
  8395.  
  8396. Return value
  8397.  
  8398.    The video page size in bytes.
  8399.  
  8400. Restrictions
  8401.  
  8402.    none
  8403.  
  8404.  
  8405.  
  8406.  
  8407.  
  8408.  
  8409.  
  8410.  
  8411.  
  8412.  
  8413.  
  8414.  
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.  
  8423.  
  8424.  
  8425.  
  8426.  
  8427.  
  8428.  
  8429.  
  8430.  
  8431.  
  8432.  
  8433.  
  8434.  
  8435.  
  8436.                                      138
  8437. fg_paint
  8438.  
  8439. Prototype
  8440.  
  8441.    void fg_paint (int ix, int iy);
  8442.    sub FGpaint (ix%, iy%)
  8443.    subroutine fg_paint (i*2 ix, i*2 iy)
  8444.    procedure fg_paint (ix, iy : integer);
  8445.  
  8446. Description
  8447.  
  8448.    The fg_paint routine fills an arbitrary closed region with the current
  8449.    color value.  The region is defined by specifying a screen space point
  8450.    within its interior.
  8451.  
  8452. Parameters
  8453.  
  8454.    ix is the screen space x coordinate of the interior point.
  8455.  
  8456.    iy is the screen space y coordinate of the interior point.
  8457.  
  8458. Return value
  8459.  
  8460.    none
  8461.  
  8462. Restrictions
  8463.  
  8464.    This routine has no effect in text video modes.  The screen edges are not
  8465.    considered region boundaries, and filling an open region will cause
  8466.    fg_paint to behave unpredictably.
  8467.  
  8468. See also
  8469.  
  8470.    fg_flood, fg_paintw
  8471.  
  8472. Examples
  8473.  
  8474.    6-17, 13-5
  8475.  
  8476.  
  8477.  
  8478.  
  8479.  
  8480.  
  8481.  
  8482.  
  8483.  
  8484.  
  8485.  
  8486.  
  8487.  
  8488.  
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.                                      139
  8496. fg_paintw
  8497.  
  8498. Prototype
  8499.  
  8500.    void fg_paintw (double x, double y);
  8501.    sub FGpaintw (x#, y#)
  8502.    subroutine fg_paintw (r*8 x, r*8 y)
  8503.    procedure fg_paintw (x, y : real);
  8504.  
  8505. Description
  8506.  
  8507.    The fg_paintw routine fills an arbitrary closed region with the current
  8508.    color value.  The region is defined by specifying a world space point
  8509.    within its interior.
  8510.  
  8511. Parameters
  8512.  
  8513.    x is the world space x coordinate of the interior point.
  8514.  
  8515.    y is the world space y coordinate of the interior point.
  8516.  
  8517. Return value
  8518.  
  8519.    none
  8520.  
  8521. Restrictions
  8522.  
  8523.    This routine is not available in Fastgraph/Light and has no effect in text
  8524.    video modes.  The screen edges are not considered region boundaries, and
  8525.    filling an open region will cause fg_paintw to behave unpredictably.
  8526.  
  8527. See also
  8528.  
  8529.    fg_floodw, fg_paint
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.  
  8540.  
  8541.  
  8542.  
  8543.  
  8544.  
  8545.  
  8546.  
  8547.  
  8548.  
  8549.  
  8550.  
  8551.  
  8552.  
  8553.  
  8554.                                      140
  8555. fg_palette
  8556.  
  8557. Prototype
  8558.  
  8559.    void fg_palette (int number, int color);
  8560.    sub FGpalette (number%, color%)
  8561.    subroutine fg_palette (i*2 number, i*2 color)
  8562.    procedure fg_palette (number, color : integer);
  8563.  
  8564. Description
  8565.  
  8566.    The fg_palette routine has different functions depending on the current
  8567.    graphics video mode.  For CGA four-color modes (modes 4 and 5), it
  8568.    establishes the current palette and defines the background color for that
  8569.    palette.  In the CGA two-color mode (mode 6), it defines the foreground
  8570.    color.  For 16-color graphics modes (modes 9, 13, 14, 15, 16, 17, 18, 28,
  8571.    and 29), it defines the value of a palette register.  For 256-color
  8572.    graphics modes (modes 19 through 27), it defines the value of a video DAC
  8573.    register.
  8574.  
  8575. Parameters
  8576.  
  8577.    The meanings of the number and color parameters depend on the current video
  8578.    mode.  The following table summarizes the parameter meanings and legal
  8579.    values for each video mode.
  8580.  
  8581.    mode   number parameter (range)           color parameter (range)
  8582.  
  8583.    4-5    CGA palette number (0 to 5)        background color (0 to 15)
  8584.    6      ignored                            foreground color (0 to 15)
  8585.    9      palette register (0 to 15)         palette value (0 to 15)
  8586.    13-14  palette register (0 to 15)         palette value (0 to 23)
  8587.    15     palette register (0, 1, 4, or 5)   palette value (0, 8, or 24)
  8588.    16     palette register (0 to 15)         palette value (0 to 63)
  8589.    17     palette register (0 or 1)          video DAC register (0 to 15)
  8590.    18     palette register (0 to 15)         video DAC register (0 to 15)
  8591.    19-27  video DAC register (0 to 255)      DAC value (0 to 63)
  8592.    28-29  palette register (0 to 15)         video DAC register (0 to 15)
  8593.  
  8594.    Refer to Chapter 5 of the Fastgraph User's Guide for more specific
  8595.    information about the number and color parameters.
  8596.  
  8597. Return value
  8598.  
  8599.    none
  8600.  
  8601. Restrictions
  8602.  
  8603.    This routine has no effect in text video modes or Hercules graphics modes.
  8604.    Changing the foreground color (in mode 6) always works on true CGA
  8605.    adapters, but there are very few EGA and VGA adapters that correctly
  8606.    implement this capability in their mode 6 emulation.
  8607.  
  8608. See also
  8609.  
  8610.    fg_defcolor, fg_maprgb, fg_palettes, fg_setcolor, fg_setdacs, fg_setrgb
  8611.  
  8612.  
  8613.                                      141
  8614. fg_palette (continued)
  8615.  
  8616. Examples
  8617.  
  8618.    5-1, 5-2, 5-3, 5-6, 5-7, 5-8, 5-9, 5-13, 5-16, 9-6
  8619.  
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.  
  8672.                                      142
  8673. fg_palettes
  8674.  
  8675. Prototype
  8676.  
  8677.    void fg_palettes (int *color_array);
  8678.    sub FGpalettes (color_array%())
  8679.    subroutine fg_palettes (i*2 color_array)
  8680.    procedure fg_palettes (var color_array : integer);
  8681.  
  8682. Description
  8683.  
  8684.    The fg_palettes routine defines all 16 palette registers (in 16-color
  8685.    graphics modes), or the first 16 video DAC registers (in 256-color graphics
  8686.    modes).
  8687.  
  8688. Parameters
  8689.  
  8690.    color_array is a 16-element array that contains the values to assign to the
  8691.    palette registers or video DAC registers.
  8692.  
  8693. Return value
  8694.  
  8695.    none
  8696.  
  8697. Restrictions
  8698.  
  8699.    This routine has no effect in text video modes, CGA graphics modes, or
  8700.    Hercules graphics modes.
  8701.  
  8702. See also
  8703.  
  8704.    fg_maprgb, fg_palette, fg_setdacs
  8705.  
  8706. Examples
  8707.  
  8708.    5-14
  8709.  
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.  
  8730.  
  8731.                                      143
  8732. fg_pan
  8733.  
  8734. Prototype
  8735.  
  8736.    void fg_pan (int ix, int iy);
  8737.    sub FGpan (ix%, iy%)
  8738.    subroutine fg_pan (i*2 ix, i*2 iy)
  8739.    procedure fg_pan (ix, iy : integer);
  8740.  
  8741. Description
  8742.  
  8743.    The fg_pan routine changes the screen origin (the upper left corner of the
  8744.    screen) to the specified screen space coordinates.
  8745.  
  8746. Parameters
  8747.  
  8748.    ix is the new screen space x coordinate for the screen origin.
  8749.  
  8750.    iy is the new screen space y coordinate for the screen origin.
  8751.  
  8752. Return value
  8753.  
  8754.    none
  8755.  
  8756. Restrictions
  8757.  
  8758.    This routine has no effect in text video modes.  Because of hardware
  8759.    limitations, only certain coordinate positions can be used as the screen
  8760.    origin.  Fastgraph compensates for these restrictions by reducing ix and iy
  8761.    to acceptable values in the pertinent video modes, as shown in the
  8762.    following table.
  8763.  
  8764.                            x will be reduced   y will be reduced
  8765.           video mode       to a multiple of:   to a multiple of:
  8766.  
  8767.               4-5                  8                   2
  8768.                6                  16                   2
  8769.                9                   4                   4
  8770.               11                   8                   4
  8771.               12                   4                2 or 3
  8772.  
  8773. See also
  8774.  
  8775.    fg_panw
  8776.  
  8777. Examples
  8778.  
  8779.    13-6, 13-7
  8780.  
  8781.  
  8782.  
  8783.  
  8784.  
  8785.  
  8786.  
  8787.  
  8788.  
  8789.  
  8790.                                      144
  8791. fg_panw
  8792.  
  8793. Prototype
  8794.  
  8795.    void fg_panw (double x, double y);
  8796.    sub FGpanw (x#, y#)
  8797.    subroutine fg_panw (r*8 x, r*8 y)
  8798.    procedure fg_panw (x, y : real);
  8799.  
  8800. Description
  8801.  
  8802.    The fg_panw routine changes the screen origin (the upper left corner of the
  8803.    screen) to the specified world space coordinates.
  8804.  
  8805. Parameters
  8806.  
  8807.    x is the new world space x coordinate for the screen origin.
  8808.  
  8809.    y is the new world space y coordinate for the screen origin.
  8810.  
  8811. Return value
  8812.  
  8813.    none
  8814.  
  8815. Restrictions
  8816.  
  8817.    This routine is not available in Fastgraph/Light and has no effect in text
  8818.    video modes.  To compensate for the hardware limitations that restrict the
  8819.    screen origin coordinates (see the description of the fg_pan routine),
  8820.    Fastgraph reduces x and y to an acceptable screen space equivalent.
  8821.  
  8822. See also
  8823.  
  8824.    fg_pan
  8825.  
  8826.  
  8827.  
  8828.  
  8829.  
  8830.  
  8831.  
  8832.  
  8833.  
  8834.  
  8835.  
  8836.  
  8837.  
  8838.  
  8839.  
  8840.  
  8841.  
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.  
  8849.                                      145
  8850. fg_pattern
  8851.  
  8852. Prototype
  8853.  
  8854.    void fg_pattern (int index, int display_pattern);
  8855.    sub FGpattern (index%, display_pattern%)
  8856.    subroutine fg_pattern (i*2 index, i*2 display_pattern)
  8857.    procedure fg_pattern (index, display_pattern : integer);
  8858.  
  8859. Description
  8860.  
  8861.    The fg_pattern routine defines one of Fastgraph's 256 display patterns used
  8862.    with the fg_dispfile, fg_display, or fg_displayp routines.  When using
  8863.    these routines to display a pixel run map, Fastgraph will use the pattern
  8864.    associated with that color index instead of displaying the color itself.
  8865.    Refer to the Fastgraph User's Guide for more information about display
  8866.    patterns and their default values for each graphics video mode.
  8867.  
  8868. Parameters
  8869.  
  8870.    index is the number of the display pattern to define, between 0 and 255.
  8871.  
  8872.    display_pattern is a 16-bit value representing the actual display pattern.
  8873.    Its structure depends on the video mode, as summarized in the following
  8874.    table.
  8875.  
  8876.      video modes         pattern structure
  8877.  
  8878.      4, 5, 12            shift count (8 bits), four pixels (2 bits each)
  8879.      6, 11               shift count (8 bits), eight pixels (1 bit each)
  8880.      9                   shift count (8 bits), two pixels (4 bits each)
  8881.      13-16, 18, 28, 29   unused (8 bits), two pixels (4 bits each)
  8882.      17                  unused (14 bits), two pixels (1 bit each)
  8883.  
  8884.    The shift count defines the number of bits that display_pattern is rotated
  8885.    left when applied to odd-numbered pixel rows, while the pixels are the
  8886.    actual color values replicated through the pixel run.  For the EGA and VGA
  8887.    graphics modes, an implied one pixel shift count is used.
  8888.  
  8889. Return value
  8890.  
  8891.    none
  8892.  
  8893. Restrictions
  8894.  
  8895.    This routine has no effect in text video modes or in 256-color graphics
  8896.    modes.
  8897.  
  8898. See also
  8899.  
  8900.    fg_dispfile, fg_display, fg_displayp, fg_showppr, fg_showspr
  8901.  
  8902. Examples
  8903.  
  8904.    9-6
  8905.  
  8906.  
  8907.  
  8908.                                      146
  8909. fg_pcxhead
  8910.  
  8911. Prototype
  8912.  
  8913.    int fg_pcxhead (char *pcx_file, char *pcx_header);
  8914.    function FGpcxhead% (pcx_file$, pcx_header$)
  8915.    i*2 function fg_pcxhead (c*(*) pcx_file, i*1 pcx_header)
  8916.    function fg_pcxhead (pcx_file : string; var pcx_header : byte) : integer;
  8917.  
  8918. Description
  8919.  
  8920.    The fg_pcxhead routine reads a PCX file header into a 128-byte buffer.
  8921.  
  8922. Parameters
  8923.  
  8924.    pcx_file is the name of the PCX file.  It may include a path specification
  8925.    and must be terminated by a zero byte.
  8926.  
  8927.    pcx_header is the address of the 128-byte buffer to receive the PCX file
  8928.    header.  In BASIC programs, it must be a fixed-length 128-byte string.
  8929.  
  8930.  
  8931. Return value
  8932.  
  8933.     0 = Success
  8934.    -1 = The specified file does not exist
  8935.    -2 = The specified file is not a PCX file
  8936.  
  8937. Restrictions
  8938.  
  8939.    none
  8940.  
  8941. See also
  8942.  
  8943.    fg_pcxmode, fg_showpcx
  8944.  
  8945. Examples
  8946.  
  8947.    9-2
  8948.  
  8949.  
  8950.  
  8951.  
  8952.  
  8953.  
  8954.  
  8955.  
  8956.  
  8957.  
  8958.  
  8959.  
  8960.  
  8961.  
  8962.  
  8963.  
  8964.  
  8965.  
  8966.  
  8967.                                      147
  8968. fg_pcxmode
  8969.  
  8970. Prototype
  8971.  
  8972.    int fg_pcxmode (char *pcx_header);
  8973.    function FGpcxmode% (pcx_header$)
  8974.    i*2 function fg_pcxmode (i*1 pcx_header)
  8975.    function fg_pcxmode (var pcx_header : byte) : integer;
  8976.  
  8977. Description
  8978.  
  8979.    The fg_pcxmode routine determines the optimal video mode for displaying a
  8980.    PCX file.  The optimal mode is the compatible video mode having the lowest
  8981.    resolution larger than or equal to the image dimensions.  See the
  8982.    description of the fg_showpcx routine for a table of compatible video modes
  8983.    for PCX files.
  8984.  
  8985. Parameters
  8986.  
  8987.    pcx_header is the address of a 128-byte buffer containing the PCX file
  8988.    header.  In BASIC programs, it must be a fixed-length 128-byte string.
  8989.  
  8990. Return value
  8991.  
  8992.    >0 = The optimal video mode for displaying the PCX image
  8993.    -1 = pcx_header does not contain a valid PCX file header
  8994.    -2 = Cannot determine a compatible video mode
  8995.  
  8996. Restrictions
  8997.  
  8998.    none
  8999.  
  9000. See also
  9001.  
  9002.    fg_pcxhead, fg_setmode, fg_showpcx
  9003.  
  9004. Examples
  9005.  
  9006.    9-2
  9007.  
  9008.  
  9009.  
  9010.  
  9011.  
  9012.  
  9013.  
  9014.  
  9015.  
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.                                      148
  9027. fg_playing
  9028.  
  9029. Prototype
  9030.  
  9031.    int fg_playing (void);
  9032.    function FGplaying% ()
  9033.    i*2 function fg_playing ()
  9034.    function fg_playing : integer;
  9035.  
  9036. Description
  9037.  
  9038.    The fg_playing routine determines whether or not there is any asynchronous
  9039.    sound in progress.
  9040.  
  9041. Parameters
  9042.  
  9043.    none
  9044.  
  9045. Return value
  9046.  
  9047.    If the return value is 0, it means there is no asynchronous sound in
  9048.    progress.  If it is 1, then there is asynchronous sound in progress.
  9049.  
  9050. Restrictions
  9051.  
  9052.    none
  9053.  
  9054. See also
  9055.  
  9056.    fg_musicb, fg_sounds, fg_voices
  9057.  
  9058. Examples
  9059.  
  9060.    15-4, 15-5, 15-6, 15-7, 15-8
  9061.  
  9062.  
  9063.  
  9064.  
  9065.  
  9066.  
  9067.  
  9068.  
  9069.  
  9070.  
  9071.  
  9072.  
  9073.  
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.                                      149
  9086. fg_point
  9087.  
  9088. Prototype
  9089.  
  9090.    void fg_point (int ix, int iy);
  9091.    sub FGpoint (ix%, iy%)
  9092.    subroutine fg_point (i*2 ix, i*2 iy)
  9093.    procedure fg_point (ix, iy : integer);
  9094.  
  9095. Description
  9096.  
  9097.    The fg_point routine draws a point (displays a pixel) in screen space.
  9098.  
  9099. Parameters
  9100.  
  9101.    ix is the point's screen space x coordinate.
  9102.  
  9103.    iy is the point's screen space y coordinate.
  9104.  
  9105. Return value
  9106.  
  9107.    none
  9108.  
  9109. Restrictions
  9110.  
  9111.    This routine has no effect in text video modes.
  9112.  
  9113. See also
  9114.  
  9115.    fg_pointw, fg_pointx
  9116.  
  9117. Examples
  9118.  
  9119.    6-1
  9120.  
  9121.  
  9122.  
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.  
  9140.  
  9141.  
  9142.  
  9143.  
  9144.                                      150
  9145. fg_pointw
  9146.  
  9147. Prototype
  9148.  
  9149.    void fg_pointw (double x, double y);
  9150.    sub FGpointw (x#, y#)
  9151.    subroutine fg_pointw (r*8 x, r*8 y)
  9152.    procedure fg_pointw (x, y : real);
  9153.  
  9154. Description
  9155.  
  9156.    The fg_pointw routine draws a point (displays a pixel) in world space.
  9157.  
  9158. Parameters
  9159.  
  9160.    x is the point's world space x coordinate.
  9161.  
  9162.    y is the point's world space y coordinate.
  9163.  
  9164. Return value
  9165.  
  9166.    none
  9167.  
  9168. Restrictions
  9169.  
  9170.    This routine is not available in Fastgraph/Light and has no effect in text
  9171.    video modes.
  9172.  
  9173. See also
  9174.  
  9175.    fg_point, fg_pointxw
  9176.  
  9177.  
  9178.  
  9179.  
  9180.  
  9181.  
  9182.  
  9183.  
  9184.  
  9185.  
  9186.  
  9187.  
  9188.  
  9189.  
  9190.  
  9191.  
  9192.  
  9193.  
  9194.  
  9195.  
  9196.  
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.                                      151
  9204. fg_pointx
  9205.  
  9206. Prototype
  9207.  
  9208.    void fg_pointx (int ix, int iy);
  9209.    sub FGpointx (ix%, iy%)
  9210.    subroutine fg_pointx (i*2 ix, i*2 iy)
  9211.    procedure fg_pointx (ix, iy : integer);
  9212.  
  9213. Description
  9214.  
  9215.    The fg_pointx routine draws a point (display a pixel) in "exclusive or"
  9216.    mode in screen space.
  9217.  
  9218. Parameters
  9219.  
  9220.    ix is the point's screen space x coordinate.
  9221.  
  9222.    iy is the point's screen space y coordinate.
  9223.  
  9224. Return value
  9225.  
  9226.    none
  9227.  
  9228. Restrictions
  9229.  
  9230.    This routine has no effect in text video modes.
  9231.  
  9232.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  9233.    is reset to its default replacement mode on return.
  9234.  
  9235. See also
  9236.  
  9237.    fg_point, fg_pointxw
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.                                      152
  9263. fg_pointxw
  9264.  
  9265. Prototype
  9266.  
  9267.    void fg_pointxw (double x, double y);
  9268.    sub FGpointxw (x#, y#)
  9269.    subroutine fg_pointxw (r*8 x, r*8 y)
  9270.    procedure fg_pointxw (x, y : real);
  9271.  
  9272. Description
  9273.  
  9274.    The fg_pointxw routine draws a point (displays a pixel) in "exclusive or"
  9275.    mode in world space.
  9276.  
  9277. Parameters
  9278.  
  9279.    x is the point's world space x coordinate.
  9280.  
  9281.    y is the point's world space y coordinate.
  9282.  
  9283. Return value
  9284.  
  9285.    none
  9286.  
  9287. Restrictions
  9288.  
  9289.    This routine is not available in Fastgraph/Light and has no effect in text
  9290.    video modes.
  9291.  
  9292.    In 16-color EGA, VGA, or SVGA graphics modes, the EGA/VGA function register
  9293.    is reset to its default replacement mode on return.
  9294.  
  9295. See also
  9296.  
  9297.    fg_pointw, fg_pointx
  9298.  
  9299.  
  9300.  
  9301.  
  9302.  
  9303.  
  9304.  
  9305.  
  9306.  
  9307.  
  9308.  
  9309.  
  9310.  
  9311.  
  9312.  
  9313.  
  9314.  
  9315.  
  9316.  
  9317.  
  9318.  
  9319.  
  9320.  
  9321.                                      153
  9322. fg_polyfill
  9323.  
  9324. Prototype
  9325.  
  9326.    void fg_polyfill (int *vertex_array, int *work_array, int n);
  9327.    sub FGpolyfill (vertex_array%(), work_array%(), n%)
  9328.    subroutine fg_polyfill (i*2 vertex_array, i*2 work_array, i*2 n)
  9329.    procedure fg_polyfill (var vertex_array, work_array : integer;
  9330.      n : integer);
  9331.  
  9332. Description
  9333.  
  9334.    The fg_polyfill routine draws a filled convex polygon in screen space.  The
  9335.    polygon is filled with pixels of the current color.
  9336.  
  9337. Parameters
  9338.  
  9339.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  9340.    pairs of each vertex.  The first array element is the x component of the
  9341.    first vertex, the second element is the y component of the first vertex,
  9342.    the third element is the x component of the second vertex, and so forth.
  9343.  
  9344.    work_array is used internally by the fg_polyfill routine.  Its size must be
  9345.    at least twice the polygon height if defined as an integer array, or four
  9346.    times the polygon height if defined as a byte array.
  9347.  
  9348.    n is the number of vertices in the polygon.
  9349.  
  9350. Return value
  9351.  
  9352.    none
  9353.  
  9354. Restrictions
  9355.  
  9356.    This routine has no effect in text video modes.
  9357.  
  9358.    If you attempt to fill a non-convex polygon, only a portion of it will be
  9359.    filled.
  9360.  
  9361. See also
  9362.  
  9363.    fg_polyline, fg_polyoff
  9364.  
  9365. Examples
  9366.  
  9367.    6-8
  9368.  
  9369.  
  9370.  
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.  
  9380.                                      154
  9381. fg_polygon
  9382.  
  9383. Prototype
  9384.  
  9385.    void fg_polygon (int *ix_array, int *iy_array, int n);
  9386.    sub FGpolygon (ix_array%(), iy_array%(), n%)
  9387.    subroutine fg_polygon (i*2 ix_array, i*2 iy_array, i*2 n)
  9388.    procedure fg_polygon (var ix_array, iy_array : integer; n : integer);
  9389.  
  9390. Description
  9391.  
  9392.    The fg_polygon routine draws an unfilled polygon in screen space, using two
  9393.    coordinate arrays to define the polygon vertices.  The drawing of the
  9394.    polygon begins at the first vertex defined in the coordinate arrays,
  9395.    through the remaining vertices in sequence, and finally back to the first
  9396.    vertex if necessary.
  9397.  
  9398. Parameters
  9399.  
  9400.    ix_array is an arbitrary-length array containing the screen space x
  9401.    coordinates of the polygon vertices.
  9402.  
  9403.    iy_array is an arbitrary-length array containing the screen space y
  9404.    coordinates of the polygon vertices.
  9405.  
  9406.    n is the number of vertices in the polygon.
  9407.  
  9408. Return value
  9409.  
  9410.    none
  9411.  
  9412. Restrictions
  9413.  
  9414.    This routine has no effect in text video modes.
  9415.  
  9416. See also
  9417.  
  9418.    fg_polyline, fg_polygonw
  9419.  
  9420. Examples
  9421.  
  9422.    6-7
  9423.  
  9424.  
  9425.  
  9426.  
  9427.  
  9428.  
  9429.  
  9430.  
  9431.  
  9432.  
  9433.  
  9434.  
  9435.  
  9436.  
  9437.  
  9438.  
  9439.                                      155
  9440. fg_polygonw
  9441.  
  9442. Prototype
  9443.  
  9444.    void fg_polygonw (double *x_array, double *y_array, int n);
  9445.    sub FGpolygonw (x_array#(), y_array#(), n%)
  9446.    subroutine fg_polygonw (r*8 x_array, r*8 y_array, i*2 n)
  9447.    procedure fg_polygonw (var x_array, y_array : real; n : integer);
  9448.  
  9449. Description
  9450.  
  9451.    The fg_polygonw routine draws an unfilled polygon in world space, using two
  9452.    coordinate arrays to define the polygon vertices.  The drawing of the
  9453.    polygon begins at the first vertex defined in the coordinate arrays,
  9454.    through the remaining vertices in sequence, and finally back to the first
  9455.    vertex if necessary.
  9456.  
  9457. Parameters
  9458.  
  9459.    x_array is an arbitrary-length array containing the world space x
  9460.    coordinates of the polygon vertices.
  9461.  
  9462.    y_array is an arbitrary-length array containing the world space y
  9463.    coordinates of the polygon vertices.
  9464.  
  9465.    n is the number of vertices in the polygon.
  9466.  
  9467. Return value
  9468.  
  9469.    none
  9470.  
  9471. Restrictions
  9472.  
  9473.    This routine is not available in Fastgraph/Light and has no effect in text
  9474.    video modes.
  9475.  
  9476. See also
  9477.  
  9478.    fg_polygon
  9479.  
  9480.  
  9481.  
  9482.  
  9483.  
  9484.  
  9485.  
  9486.  
  9487.  
  9488.  
  9489.  
  9490.  
  9491.  
  9492.  
  9493.  
  9494.  
  9495.  
  9496.  
  9497.  
  9498.                                      156
  9499. fg_polyline
  9500.  
  9501. Prototype
  9502.  
  9503.    void fg_polyline (int *vertex_array, int n);
  9504.    sub FGpolyline (vertex_array%(), n%)
  9505.    subroutine fg_polyline (i*2 vertex_array, i*2 n)
  9506.    procedure fg_polyline (var vertex_array : integer; n : integer);
  9507.  
  9508. Description
  9509.  
  9510.    The fg_polyline routine draws an unfilled polygon in screen space, using
  9511.    a single array to define the polygon vertices.  Compare this to the
  9512.    fg_polygon routine, which uses separate arrays for the x and y components
  9513.    of each vertex.
  9514.  
  9515. Parameters
  9516.  
  9517.    vertex_array is an arbitrary-length array containing the (x,y) coordinate
  9518.    pairs of each vertex.  The first array element is the x component of the
  9519.    first vertex, the second element is the y component of the first vertex,
  9520.    the third element is the x component of the second vertex, and so forth.
  9521.  
  9522.    n is the number of vertices in the polygon.
  9523.  
  9524. Return value
  9525.  
  9526.    none
  9527.  
  9528. Restrictions
  9529.  
  9530.    This routine has no effect in text video modes.
  9531.  
  9532. See also
  9533.  
  9534.    fg_polyfill, fg_polygon, fg_polyoff
  9535.  
  9536. Examples
  9537.  
  9538.    6-8
  9539.  
  9540.  
  9541.  
  9542.  
  9543.  
  9544.  
  9545.  
  9546.  
  9547.  
  9548.  
  9549.  
  9550.  
  9551.  
  9552.  
  9553.  
  9554.  
  9555.  
  9556.  
  9557.                                      157
  9558. fg_polyoff
  9559.  
  9560. Prototype
  9561.  
  9562.    void fg_polyoff (int ix, int iy);
  9563.    sub FGpolyoff (ix%, iy%)
  9564.    subroutine fg_polyoff (i*2 ix, i*2 iy)
  9565.    procedure fg_polyoff (ix, iy : integer);
  9566.  
  9567. Description
  9568.  
  9569.    The fg_polyoff routine defines the screen space offset applied to each
  9570.    vertex for polygons drawn with fg_polyfill or fg_polyline.  By default, the
  9571.    polygon display functions use an offset of zero, meaning their vertex
  9572.    arrays specify the actual vertex coordinates.
  9573.  
  9574. Parameters
  9575.  
  9576.    ix is the horizontal screen space offset applied to the x component of all
  9577.    vertices.
  9578.  
  9579.    iy is the vertical screen space offset applied to the y component of all
  9580.    vertices.
  9581.  
  9582. Return value
  9583.  
  9584.    none
  9585.  
  9586. Restrictions
  9587.  
  9588.    none
  9589.  
  9590. See also
  9591.  
  9592.    fg_polyfill, fg_polyline
  9593.  
  9594. Examples
  9595.  
  9596.    6-8
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.                                      158
  9617. fg_print
  9618.  
  9619. Prototype
  9620.  
  9621.    void fg_print (char *string, int n);
  9622.    sub FGprint (string$, n%)
  9623.    subroutine fg_print (c*(*) string, i*2 n)
  9624.    procedure fg_print (string : string; n : integer);
  9625.  
  9626. Description
  9627.  
  9628.    The fg_print routine displays a string of hardware characters relative to
  9629.    the current graphics position using the current color index.  By default,
  9630.    strings are displayed such that the bottom row of the first character is at
  9631.    the current graphics position.  On return, the graphics cursor is
  9632.    positioned just to the right of the last character displayed.
  9633.  
  9634. Parameters
  9635.  
  9636.    string is the arbitrary-length sequence of characters to display.
  9637.  
  9638.    n is the number of characters to display from string.
  9639.  
  9640. Return value
  9641.  
  9642.    none
  9643.  
  9644. Restrictions
  9645.  
  9646.    This routine has no effect in text video modes.
  9647.  
  9648. See also
  9649.  
  9650.    fg_justify, fg_text
  9651.  
  9652. Examples
  9653.  
  9654.    7-6
  9655.  
  9656.  
  9657.  
  9658.  
  9659.  
  9660.  
  9661.  
  9662.  
  9663.  
  9664.  
  9665.  
  9666.  
  9667.  
  9668.  
  9669.  
  9670.  
  9671.  
  9672.  
  9673.  
  9674.  
  9675.                                      159
  9676. fg_putblock
  9677.  
  9678. Prototype
  9679.  
  9680.    void fg_putblock (char far *buffer, int minx, int maxx, int miny,
  9681.      int maxy);
  9682.    sub FGputblock (buffer$, minx%, maxx%, miny%, maxy%)
  9683.    subroutine fg_putblock (i*1 far buffer, i*2 minx, i*2 maxx, i*2 miny,
  9684.      i*2 maxy)
  9685.    procedure fg_putblock (buffer : pointer; minx, maxx, miny, maxy : integer);
  9686.  
  9687. Description
  9688.  
  9689.    The fg_putblock routine displays a block (previously obtained with
  9690.    fg_getblock) at the specified position on the active video page.  In text
  9691.    modes, the block extremes are defined in character space; in graphics
  9692.    modes, they are defined in screen space.
  9693.  
  9694. Parameters
  9695.  
  9696.    buffer is the address of the array containing the block.  Note that this is
  9697.    passed by FAR reference, except in QuickBASIC.
  9698.  
  9699.    minx is the x coordinate of the block's left edge.  In graphics modes, its
  9700.    value is reduced to a byte boundary if necessary.
  9701.  
  9702.    maxx is the x coordinate of the block's right edge.  It must be greater
  9703.    than or equal to the value of minx.  In graphics modes, its value is
  9704.    extended to a byte boundary if necessary.
  9705.  
  9706.    miny is the y coordinate of the block's top edge.
  9707.  
  9708.    maxy is the y coordinate of the block's bottom edge.  It must be greater
  9709.    than or equal to the value of miny.
  9710.  
  9711. Return value
  9712.  
  9713.    none
  9714.  
  9715. Restrictions
  9716.  
  9717.    The maximum size of a block is 64K bytes.
  9718.  
  9719.    In Pascal programs, buffer must be allocated dynamically with the GetMem
  9720.    procedure.  This is the only way to pass something by far reference in
  9721.    Pascal.
  9722.  
  9723. See also
  9724.  
  9725.    fg_getblock
  9726.  
  9727. Examples
  9728.  
  9729.    11-8
  9730.  
  9731.  
  9732.  
  9733.  
  9734.                                      160
  9735. fg_putimage
  9736.  
  9737. Prototype
  9738.  
  9739.    void fg_putimage (char *map_array, int width, int height);
  9740.    sub FGputimage (map_array$, width%, height%)
  9741.    subroutine fg_putimage (i*1 map_array, i*2 width, i*2 height)
  9742.    procedure fg_putimage (var map_array : byte; width, height : integer);
  9743.  
  9744. Description
  9745.  
  9746.    The fg_putimage routine displays an image stored as a mode-specific bit
  9747.    map, without treating color 0 as transparent.  The image will be positioned
  9748.    so that its lower left corner is at the graphics cursor position.  Refer to
  9749.    the Fastgraph User's Guide for complete information about mode-specific bit
  9750.    maps.
  9751.  
  9752. Parameters
  9753.  
  9754.    map_array is the arbitrary-length array containing the bit map.
  9755.  
  9756.    width is the width in bytes of the bit map.
  9757.  
  9758.    height is the height in bytes (pixel rows) of the bit map.
  9759.  
  9760. Return value
  9761.  
  9762.    none
  9763.  
  9764. Restrictions
  9765.  
  9766.    none
  9767.  
  9768. See also
  9769.  
  9770.    fg_drwimage, fg_getimage
  9771.  
  9772. Examples
  9773.  
  9774.    10-8, 10-9
  9775.  
  9776.  
  9777.  
  9778.  
  9779.  
  9780.  
  9781.  
  9782.  
  9783.  
  9784.  
  9785.  
  9786.  
  9787.  
  9788.  
  9789.  
  9790.  
  9791.  
  9792.  
  9793.                                      161
  9794. fg_quiet
  9795.  
  9796. Prototype
  9797.  
  9798.    void fg_quiet (void);
  9799.    sub FGquiet ()
  9800.    subroutine fg_quiet ()
  9801.    procedure fg_quiet;
  9802.  
  9803. Description
  9804.  
  9805.    The fg_quiet routine stops continuous synchronous sound started with the
  9806.    fg_sound or fg_voice routines.  It has no effect if there is no continuous
  9807.    sound in progress.
  9808.  
  9809. Parameters
  9810.  
  9811.    none
  9812.  
  9813. Return value
  9814.  
  9815.    none
  9816.  
  9817. Restrictions
  9818.  
  9819.    none
  9820.  
  9821. See also
  9822.  
  9823.    fg_sound, fg_voice
  9824.  
  9825. Examples
  9826.  
  9827.    15-2
  9828.  
  9829.  
  9830.  
  9831.  
  9832.  
  9833.  
  9834.  
  9835.  
  9836.  
  9837.  
  9838.  
  9839.  
  9840.  
  9841.  
  9842.  
  9843.  
  9844.  
  9845.  
  9846.  
  9847.  
  9848.  
  9849.  
  9850.  
  9851.  
  9852.                                      162
  9853. fg_rect
  9854.  
  9855. Prototype
  9856.  
  9857.    void fg_rect (int minx, int maxx, int miny, int maxy);
  9858.    sub FGrect (minx%, maxx%, miny%, maxy%)
  9859.    subroutine fg_rect (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  9860.    procedure fg_rect (minx, maxx, miny, maxy : integer);
  9861.  
  9862. Description
  9863.  
  9864.    The fg_rect routine draws a solid (filled) rectangle in screen space or
  9865.    character space, without regard to the clipping region.
  9866.  
  9867. Parameters
  9868.  
  9869.    minx is the x coordinate of the rectangle's left edge.
  9870.  
  9871.    maxx is the x coordinate of the rectangle's right edge.  It must be greater
  9872.    than or equal to the value of minx.
  9873.  
  9874.    miny is the y coordinate of the rectangle's top edge.
  9875.  
  9876.    maxy is the y coordinate of the rectangle's bottom edge.  It must be
  9877.    greater than or equal to the value of miny.
  9878.  
  9879. Return value
  9880.  
  9881.    none
  9882.  
  9883. Restrictions
  9884.  
  9885.    none
  9886.  
  9887. See also
  9888.  
  9889.    fg_box, fg_clprect, fg_drect, fg_rectw
  9890.  
  9891. Examples
  9892.  
  9893.    5-8, 5-10, 6-11, 6-13, 7-5, 7-9
  9894.  
  9895.  
  9896.  
  9897.  
  9898.  
  9899.  
  9900.  
  9901.  
  9902.  
  9903.  
  9904.  
  9905.  
  9906.  
  9907.  
  9908.  
  9909.  
  9910.  
  9911.                                      163
  9912. fg_rectw
  9913.  
  9914. Prototype
  9915.  
  9916.    void fg_rectw (double xmin, double xmax, double ymin, double ymax);
  9917.    sub FGrectw (xmin#, xmax#, ymin#, ymax#)
  9918.    subroutine fg_rectw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  9919.    procedure fg_rectw (xmin, xmax, ymin, ymax : real);
  9920.  
  9921. Description
  9922.  
  9923.    The fg_rectw routine draws a solid (filled) rectangle in world space,
  9924.    without regard to the clipping region.
  9925.  
  9926. Parameters
  9927.  
  9928.    xmin is the world space x coordinate of the rectangle's left edge.
  9929.  
  9930.    xmax is the world space x coordinate of the rectangle's right edge.  It
  9931.    must be greater than or equal to the value of xmin.
  9932.  
  9933.    ymin is the world space y coordinate of the rectangle's bottom edge.
  9934.  
  9935.    ymax is the world space y coordinate of the rectangle's top edge.  It must
  9936.    be greater than or equal to the value of ymin.
  9937.  
  9938. Return value
  9939.  
  9940.    none
  9941.  
  9942. Restrictions
  9943.  
  9944.    This routine is not available in Fastgraph/Light.
  9945.  
  9946. See also
  9947.  
  9948.    fg_boxw, fg_clprectw, fg_drectw, fg_rect
  9949.  
  9950. Examples
  9951.  
  9952.    7-13
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.  
  9962.  
  9963.  
  9964.  
  9965.  
  9966.  
  9967.  
  9968.  
  9969.  
  9970.                                      164
  9971. fg_reset
  9972.  
  9973. Prototype
  9974.  
  9975.    void fg_reset (void);
  9976.    sub FGreset ()
  9977.    subroutine fg_reset ()
  9978.    procedure fg_reset;
  9979.  
  9980. Description
  9981.  
  9982.    When the ANSI.SYS driver is not loaded, the fg_reset routine erases the
  9983.    screen.  When ANSI.SYS is loaded, fg_reset also restores any previously set
  9984.    screen attributes.  It is generally the last Fastgraph routine called in a
  9985.    program.
  9986.  
  9987. Parameters
  9988.  
  9989.    none
  9990.  
  9991. Return value
  9992.  
  9993.    none
  9994.  
  9995. Restrictions
  9996.  
  9997.    This routine has no effect in graphics video modes.
  9998.  
  9999. See also
  10000.  
  10001.    fg_erase
  10002.  
  10003. Examples
  10004.  
  10005.    3-2
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.                                      165
  10030. fg_resize
  10031.  
  10032. Prototype
  10033.  
  10034.    void fg_resize (int width, int height);
  10035.    sub FGresize (width%, height%)
  10036.    subroutine fg_resize (i*2 width, i*2 height)
  10037.    procedure fg_resize (width, height : integer);
  10038.  
  10039. Description
  10040.  
  10041.    The fg_resize routine changes the dimensions of a video page in EGA, VGA,
  10042.    and SVGA graphics modes.
  10043.  
  10044. Parameters
  10045.  
  10046.    width specifies the new video page width in pixels.
  10047.  
  10048.    height specifies the new video page height in pixels.
  10049.  
  10050. Return value
  10051.  
  10052.    none
  10053.  
  10054. Restrictions
  10055.  
  10056.    The size of a video page is constrained only by the amount of video memory
  10057.    available.  Increasing the video page size reduces the number of physical
  10058.    pages available proportionally.  In mode 13, for example, increasing the
  10059.    page size from 320x200 to 640x400 reduces the number of video pages from 8
  10060.    to 2.
  10061.  
  10062.    When you call fg_resize, the visual page must be page 0.
  10063.  
  10064.    If you have created any logical video pages, you must release them with
  10065.    fg_freepage before calling fg_resize, and then create them again afterward.
  10066.  
  10067.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  10068.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  10069.    fg_initxms), you should re-initialize these resources after calling
  10070.    fg_resize.  Most mouse drivers expect a fixed video page width, so the
  10071.    mouse cursor may become distorted after resizing video pages.
  10072.  
  10073.    Partial video pages (initially available in some video modes) are
  10074.    unavailable after calling fg_resize, even if you use the video mode's
  10075.    original resolution.
  10076.  
  10077.    The fg_setmode routine re-establishes the dimensions of a video page to the
  10078.    default screen resolution for the selected video mode.
  10079.  
  10080.    This routine is meaningful only in the native EGA and VGA graphics modes
  10081.    (13 to 18), extended VGA graphics modes (20 to 23), and SVGA graphics modes
  10082.    (24 to 29).  It has no effect in other video modes.
  10083.  
  10084. See also
  10085.  
  10086.    fg_pan
  10087.  
  10088.                                      166
  10089. fg_resize (continued)
  10090.  
  10091. Examples
  10092.  
  10093.    8-10, 13-7
  10094.  
  10095.  
  10096.  
  10097.  
  10098.  
  10099.  
  10100.  
  10101.  
  10102.  
  10103.  
  10104.  
  10105.  
  10106.  
  10107.  
  10108.  
  10109.  
  10110.  
  10111.  
  10112.  
  10113.  
  10114.  
  10115.  
  10116.  
  10117.  
  10118.  
  10119.  
  10120.  
  10121.  
  10122.  
  10123.  
  10124.  
  10125.  
  10126.  
  10127.  
  10128.  
  10129.  
  10130.  
  10131.  
  10132.  
  10133.  
  10134.  
  10135.  
  10136.  
  10137.  
  10138.  
  10139.  
  10140.  
  10141.  
  10142.  
  10143.  
  10144.  
  10145.  
  10146.  
  10147.                                      167
  10148. fg_restore
  10149.  
  10150. Prototype
  10151.  
  10152.    void fg_restore (int minx, int maxx, int miny, int maxy);
  10153.    sub FGrestore (minx%, maxx%, miny%, maxy%)
  10154.    subroutine fg_restore (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10155.    procedure fg_restore (minx, maxx, miny, maxy : integer);
  10156.  
  10157. Description
  10158.  
  10159.    The fg_restore routine copies a rectangular region from the hidden video
  10160.    page to the same position on the active video page.  In text modes, the
  10161.    region is defined in character space; in graphics modes, it is defined in
  10162.    screen space.
  10163.  
  10164. Parameters
  10165.  
  10166.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  10167.    value is reduced to a byte boundary if necessary.
  10168.  
  10169.    maxx is the x coordinate of the region's right edge.  It must be greater
  10170.    than or equal to the value of minx.  In graphics modes, its value is
  10171.    extended to a byte boundary if necessary.
  10172.  
  10173.    miny is the y coordinate of the region's top edge.
  10174.  
  10175.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  10176.    than or equal to the value of miny.
  10177.  
  10178. Return value
  10179.  
  10180.    none
  10181.  
  10182. Restrictions
  10183.  
  10184.    none
  10185.  
  10186. See also
  10187.  
  10188.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  10189.  
  10190. Examples
  10191.  
  10192.    11-2, 11-3
  10193.  
  10194.  
  10195.  
  10196.  
  10197.  
  10198.  
  10199.  
  10200.  
  10201.  
  10202.  
  10203.  
  10204.  
  10205.  
  10206.                                      168
  10207. fg_restorew
  10208.  
  10209. Prototype
  10210.  
  10211.    void fg_restorew (double xmin, double xmax, double ymin, double ymax);
  10212.    sub FGrestorew (xmin#, xmax#, ymin#, ymax#)
  10213.    subroutine fg_restorew (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10214.    procedure fg_restorew (xmin, xmax, ymin, ymax : real);
  10215.  
  10216. Description
  10217.  
  10218.    The fg_restorew routine copies a rectangular region, defined in world
  10219.    space, from the hidden video page to the same position on the active video
  10220.    page.
  10221.  
  10222. Parameters
  10223.  
  10224.    xmin is the world space x coordinate of the region's left edge.  In
  10225.    graphics modes, its value is reduced to a byte boundary if necessary.
  10226.  
  10227.    xmax is the world space x coordinate of the region's right edge.  It must
  10228.    be greater than or equal to the value of xmin.  In graphics modes, its
  10229.    value is extended to a byte boundary if necessary.
  10230.  
  10231.    ymin is the world space y coordinate of the region's bottom edge.
  10232.  
  10233.    ymax is the world space y coordinate of the region's top edge.  It must be
  10234.    greater than or equal to the value of ymin.
  10235.  
  10236. Return value
  10237.  
  10238.    none
  10239.  
  10240. Restrictions
  10241.  
  10242.    This routine is not available in Fastgraph/Light.
  10243.  
  10244. See also
  10245.  
  10246.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  10247.  
  10248.  
  10249.  
  10250.  
  10251.  
  10252.  
  10253.  
  10254.  
  10255.  
  10256.  
  10257.  
  10258.  
  10259.  
  10260.  
  10261.  
  10262.  
  10263.  
  10264.  
  10265.                                      169
  10266. fg_resume
  10267.  
  10268. Prototype
  10269.  
  10270.    void fg_resume (void);
  10271.    sub FGresume ()
  10272.    subroutine fg_resume ()
  10273.    procedure fg_resume;
  10274.  
  10275. Description
  10276.  
  10277.    The fg_resume routine restarts asynchronous music previously suspended by
  10278.    the fg_suspend routine.  It has no effect if there is no suspended music.
  10279.  
  10280. Parameters
  10281.  
  10282.    none
  10283.  
  10284. Return value
  10285.  
  10286.    none
  10287.  
  10288. Restrictions
  10289.  
  10290.    none
  10291.  
  10292. See also
  10293.  
  10294.    fg_musicb, fg_suspend
  10295.  
  10296. Examples
  10297.  
  10298.    15-8
  10299.  
  10300.  
  10301.  
  10302.  
  10303.  
  10304.  
  10305.  
  10306.  
  10307.  
  10308.  
  10309.  
  10310.  
  10311.  
  10312.  
  10313.  
  10314.  
  10315.  
  10316.  
  10317.  
  10318.  
  10319.  
  10320.  
  10321.  
  10322.  
  10323.  
  10324.                                      170
  10325. fg_revimage
  10326.  
  10327. Prototype
  10328.  
  10329.    void fg_revimage (char *map_array, int width, int height);
  10330.    sub FGrevimage (map_array$, width%, height%)
  10331.    subroutine fg_revimage (i*1 map_array, i*2 width, i*2 height)
  10332.    procedure fg_revimage (var map_array : byte; width, height : integer);
  10333.  
  10334. Description
  10335.  
  10336.    The fg_revimage routine displays a reversed image stored as a mode-specific
  10337.    bit map.  The image will be positioned so that its lower left corner is at
  10338.    the graphics cursor position.  Refer to the Fastgraph User's Guide for
  10339.    complete information about mode-specific bit maps.
  10340.  
  10341. Parameters
  10342.  
  10343.    map_array is the arbitrary-length array containing the bit map.
  10344.  
  10345.    width is the width in bytes of the bit map.
  10346.  
  10347.    height is the height in bytes (pixel rows) of the bit map.
  10348.  
  10349. Return value
  10350.  
  10351.    none
  10352.  
  10353. Restrictions
  10354.  
  10355.    This routine has no effect in text video modes.
  10356.  
  10357. See also
  10358.  
  10359.    fg_clpimage, fg_drwimage, fg_flpimage, fg_getimage, fg_putimage
  10360.  
  10361. Examples
  10362.  
  10363.    10-8, 10-9
  10364.  
  10365.  
  10366.  
  10367.  
  10368.  
  10369.  
  10370.  
  10371.  
  10372.  
  10373.  
  10374.  
  10375.  
  10376.  
  10377.  
  10378.  
  10379.  
  10380.  
  10381.  
  10382.  
  10383.                                      171
  10384. fg_revmask
  10385.  
  10386. Prototype
  10387.  
  10388.    void fg_revmask (char *map_array, int runs, int width);
  10389.    sub FGrevmask (map_array$, runs%, width%)
  10390.    subroutine fg_revmask (i*1 map_array, i*2 runs, i*2 width)
  10391.    procedure fg_revmask (var map_array : byte; runs, width : integer);
  10392.  
  10393. Description
  10394.  
  10395.    The fg_revmask routine displays a reversed image stored as a masking map.
  10396.    The image will be positioned so that its lower left corner is at the
  10397.    graphics cursor position.  Refer to the description of the fg_drawmask
  10398.    routine for more information about masking maps.
  10399.  
  10400. Parameters
  10401.  
  10402.    map_array is the arbitrary-length array containing the masking map.
  10403.  
  10404.    runs is the number of pixel runs in the masking map.
  10405.  
  10406.    width is the width in pixels of the masking map.
  10407.  
  10408. Return value
  10409.  
  10410.    none
  10411.  
  10412. Restrictions
  10413.  
  10414.    This routine has no effect in text video modes.
  10415.  
  10416. See also
  10417.  
  10418.    fg_clipmask, fg_drawmask, fg_flipmask
  10419.  
  10420. Examples
  10421.  
  10422.    10-17
  10423.  
  10424.  
  10425.  
  10426.  
  10427.  
  10428.  
  10429.  
  10430.  
  10431.  
  10432.  
  10433.  
  10434.  
  10435.  
  10436.  
  10437.  
  10438.  
  10439.  
  10440.  
  10441.  
  10442.                                      172
  10443. fg_save
  10444.  
  10445. Prototype
  10446.  
  10447.    void fg_save (int minx, int maxx, int miny, int maxy);
  10448.    sub FGsave (minx%, maxx%, miny%, maxy%)
  10449.    subroutine fg_save (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10450.    procedure fg_save (minx, maxx, miny, maxy : integer);
  10451.  
  10452. Description
  10453.  
  10454.    The fg_save routine copies a rectangular region from the active video page
  10455.    to the same position on the hidden video page.  In text modes, the region
  10456.    is defined in character space; in graphics modes, it is defined in screen
  10457.    space.
  10458.  
  10459. Parameters
  10460.  
  10461.    minx is the x coordinate of the region's left edge.  In graphics modes, its
  10462.    value is reduced to a byte boundary if necessary.
  10463.  
  10464.    maxx is the x coordinate of the region's right edge.  It must be greater
  10465.    than or equal to the value of minx.  In graphics modes, its value is
  10466.    extended to a byte boundary if necessary.
  10467.  
  10468.    miny is the y coordinate of the region's top edge.
  10469.  
  10470.    maxy is the y coordinate of the region's bottom edge.  It must be greater
  10471.    than or equal to the value of miny.
  10472.  
  10473. Return value
  10474.  
  10475.    none
  10476.  
  10477. Restrictions
  10478.  
  10479.    none
  10480.  
  10481. See also
  10482.  
  10483.    fg_restore, fg_savew, fg_sethpage, fg_transfer
  10484.  
  10485. Examples
  10486.  
  10487.    11-2, 11-3
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.  
  10499.  
  10500.  
  10501.                                      173
  10502. fg_savew
  10503.  
  10504. Prototype
  10505.  
  10506.    void fg_savew (double xmin, double xmax, double ymin, double ymax);
  10507.    sub FGsavew (xmin#, xmax#, ymin#, ymax#)
  10508.    subroutine fg_savew (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10509.    procedure fg_savew (xmin, xmax, ymin, ymax : real);
  10510.  
  10511. Description
  10512.  
  10513.    The fg_savew routine copies a rectangular region, defined in world space,
  10514.    from the active video page to the same position on the hidden video page.
  10515.  
  10516. Parameters
  10517.  
  10518.    xmin is the world space x coordinate of the region's left edge.  In
  10519.    graphics modes, its value is reduced to a byte boundary if necessary.
  10520.  
  10521.    xmax is the world space x coordinate of the region's right edge.  It must
  10522.    be greater than or equal to the value of xmin.  In graphics modes, its
  10523.    value is extended to a byte boundary if necessary.
  10524.  
  10525.    ymin is the world space y coordinate of the region's bottom edge.
  10526.  
  10527.    ymax is the world space y coordinate of the region's top edge.  It must be
  10528.    greater than or equal to the value of ymin.
  10529.  
  10530. Return value
  10531.  
  10532.    none
  10533.  
  10534. Restrictions
  10535.  
  10536.    This routine is not available in Fastgraph/Light.
  10537.  
  10538. See also
  10539.  
  10540.    fg_restorew, fg_save, fg_sethpage, fg_transfer
  10541.  
  10542.  
  10543.  
  10544.  
  10545.  
  10546.  
  10547.  
  10548.  
  10549.  
  10550.  
  10551.  
  10552.  
  10553.  
  10554.  
  10555.  
  10556.  
  10557.  
  10558.  
  10559.  
  10560.                                      174
  10561. fg_scrlock
  10562.  
  10563. Prototype
  10564.  
  10565.    int fg_scrlock (void);
  10566.    function FGscrlock% ()
  10567.    i*2 function fg_scrlock ()
  10568.    function fg_scrlock : integer;
  10569.  
  10570. Description
  10571.  
  10572.    The fg_scrlock routine determines the state of the ScrollLock key.
  10573.  
  10574. Parameters
  10575.  
  10576.    none
  10577.  
  10578. Return value
  10579.  
  10580.    If the return value is 0, it means the ScrollLock key is off.  If it is 1,
  10581.    it means the ScrollLock key is on.
  10582.  
  10583. Restrictions
  10584.  
  10585.    Not all PC keyboards have a ScrollLock key.  For such systems, fg_scrlock
  10586.    will return a value of zero.
  10587.  
  10588. See also
  10589.  
  10590.    fg_capslock, fg_numlock, fg_setcaps, fg_setnum
  10591.  
  10592. Examples
  10593.  
  10594.    14-3
  10595.  
  10596.  
  10597.  
  10598.  
  10599.  
  10600.  
  10601.  
  10602.  
  10603.  
  10604.  
  10605.  
  10606.  
  10607.  
  10608.  
  10609.  
  10610.  
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.                                      175
  10620. fg_scroll
  10621.  
  10622. Prototype
  10623.  
  10624.    void fg_scroll (int minx, int maxx, int miny, int maxy, int jump,
  10625.      int type);
  10626.    sub FGscroll (minx%, maxx%, miny%, maxy%, jump%, type%)
  10627.    subroutine fg_scroll (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 jump,
  10628.      i*2 type)
  10629.    procedure fg_scroll (minx, maxx, miny, maxy, jump, type : integer);
  10630.  
  10631. Description
  10632.  
  10633.    The fg_scroll routine vertically scrolls a region of the active video page.
  10634.    The scrolling may be done either up or down, using either an end-off or
  10635.    circular method.  In text modes, the region is defined in character space;
  10636.    in graphics modes, it is defined in screen space.
  10637.  
  10638. Parameters
  10639.  
  10640.    minx is the x coordinate of the scrolling region's left edge.  In graphics
  10641.    modes, its value is reduced to a byte boundary if necessary.
  10642.  
  10643.    maxx is the x coordinate of the scrolling region's right edge.  It must be
  10644.    greater than or equal to the value of minx.  In graphics modes, its value
  10645.    is extended to a byte boundary if necessary.
  10646.  
  10647.    miny is the y coordinate of the scrolling region's top edge.
  10648.  
  10649.    maxy is the y coordinate of the scrolling region's bottom edge.  It must be
  10650.    greater than or equal to the value of miny.
  10651.  
  10652.    jump is the number of pixels to jump between each scrolling iteration.  If
  10653.    jump is negative, the region will scroll toward the top of the screen.  If
  10654.    jump is positive, the region will scroll toward the bottom of the screen.
  10655.  
  10656.    type specifies the type of scroll.  If type is zero, rows that scroll off
  10657.    one edge appear at the opposite edge, thus producing a circular scrolling
  10658.    effect.  If type is any other value, rows that scroll off one edge will be
  10659.    replaced at the opposite edge by lines of the current color.
  10660.  
  10661. Return value
  10662.  
  10663.    none
  10664.  
  10665. Restrictions
  10666.  
  10667.    Circular scrolling uses part of the hidden page (as defined in the most
  10668.    recent call to fg_sethpage) as a temporary workspace.
  10669.  
  10670. See also
  10671.  
  10672.    fg_setcolor, fg_sethpage
  10673.  
  10674. Examples
  10675.  
  10676.    13-3, 13-4, 13-5
  10677.  
  10678.                                      176
  10679. fg_setangle
  10680.  
  10681. Prototype
  10682.  
  10683.    void fg_setangle (double angle);
  10684.    sub FGsetangle (angle#)
  10685.    subroutine fg_setangle (r*8 angle)
  10686.    procedure fg_setangle (angle : real);
  10687.  
  10688. Description
  10689.  
  10690.    The fg_setangle routine defines the angle or orientation at which software
  10691.    characters are displayed.  If a program draws software characters before
  10692.    calling fg_setangle, Fastgraph will use its default angle of zero degrees
  10693.    (that is, horizontal).
  10694.  
  10695. Parameters
  10696.  
  10697.    angle is the angle of rotation, expressed in degrees and measured
  10698.    counterclockwise from the positive x axis.
  10699.  
  10700. Return value
  10701.  
  10702.    none
  10703.  
  10704. Restrictions
  10705.  
  10706.    This routine is not available in Fastgraph/Light.  Before using this
  10707.    routine, you must use the fg_initw and fg_setworld routines to establish a
  10708.    world space coordinate system.
  10709.  
  10710. See also
  10711.  
  10712.    fg_initw, fg_setratio, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  10713.    fg_swlength, fg_swtext
  10714.  
  10715. Examples
  10716.  
  10717.    7-12
  10718.  
  10719.  
  10720.  
  10721.  
  10722.  
  10723.  
  10724.  
  10725.  
  10726.  
  10727.  
  10728.  
  10729.  
  10730.  
  10731.  
  10732.  
  10733.  
  10734.  
  10735.  
  10736.  
  10737.                                      177
  10738. fg_setattr
  10739.  
  10740. Prototype
  10741.  
  10742.    void fg_setattr (int foreground, int background, int blink);
  10743.    sub FGsetattr (foreground%, background%, blink%)
  10744.    subroutine fg_setattr (i*2 foreground, i*2 background, i*2 blink)
  10745.    procedure fg_setattr (foreground, background, blink : integer);
  10746.  
  10747. Description
  10748.  
  10749.    The fg_setattr routine establishes the current text attribute in text video
  10750.    modes.
  10751.  
  10752. Parameters
  10753.  
  10754.    foreground is attribute's foreground component, between 0 and 15.
  10755.  
  10756.    background is the attribute's background component, between 0 and 7.
  10757.  
  10758.    blink is the attribute's blink component, between 0 and 1.
  10759.  
  10760. Return value
  10761.  
  10762.    none
  10763.  
  10764. Restrictions
  10765.  
  10766.    This routine has no effect in graphics video modes.
  10767.  
  10768. See also
  10769.  
  10770.    fg_setcolor
  10771.  
  10772. Examples
  10773.  
  10774.    7-1, 7-2, 7-3, 7-4, 8-1, 8-3, 8-5, 8-7, 10-13, 11-2, 11-4, 13-4, 14-9
  10775.  
  10776.  
  10777.  
  10778.  
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.  
  10788.  
  10789.  
  10790.  
  10791.  
  10792.  
  10793.  
  10794.  
  10795.  
  10796.                                      178
  10797. fg_setcaps
  10798.  
  10799. Prototype
  10800.  
  10801.    void fg_setcaps (int state);
  10802.    sub FGsetcaps (state%)
  10803.    subroutine fg_setcaps (i*2 state)
  10804.    procedure fg_setcaps (state : integer);
  10805.  
  10806. Description
  10807.  
  10808.    The fg_setcaps routine controls the state of the CapsLock key.
  10809.  
  10810. Parameters
  10811.  
  10812.    state defines the CapsLock key state.  If state is 0, the CapsLock key is
  10813.    turned off.  If it is 1, the CapsLock key is turned on.
  10814.  
  10815. Return value
  10816.  
  10817.    none
  10818.  
  10819. Restrictions
  10820.  
  10821.    On most keyboards, changing the CapsLock key state will also change the
  10822.    keyboard state light to reflect the new key state.  However, some older
  10823.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  10824.    update the state light.  This makes the state light inconsistent with the
  10825.    true key state.
  10826.  
  10827. See also
  10828.  
  10829.    fg_capslock, fg_numlock, fg_scrlock, fg_setnum
  10830.  
  10831. Examples
  10832.  
  10833.    14-4
  10834.  
  10835.  
  10836.  
  10837.  
  10838.  
  10839.  
  10840.  
  10841.  
  10842.  
  10843.  
  10844.  
  10845.  
  10846.  
  10847.  
  10848.  
  10849.  
  10850.  
  10851.  
  10852.  
  10853.  
  10854.  
  10855.                                      179
  10856. fg_setclip
  10857.  
  10858. Prototype
  10859.  
  10860.    void fg_setclip (int minx, int maxx, int miny, int maxy);
  10861.    sub FGsetclip (minx%, maxx%, miny%, maxy%)
  10862.    subroutine fg_setclip (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy)
  10863.    procedure fg_setclip (minx, maxx, miny, maxy : integer);
  10864.  
  10865. Description
  10866.  
  10867.    The fg_setclip routine defines the clipping region in screen space.  The
  10868.    clipping region is a rectangular area outside of which graphics are
  10869.    suppressed.
  10870.  
  10871. Parameters
  10872.  
  10873.    minx is the screen space x coordinate of the clipping region's left edge.
  10874.  
  10875.    maxx is the screen space x coordinate of the clipping region's right edge.
  10876.    It must be greater than or equal to the value of minx.
  10877.  
  10878.    miny is the screen space y coordinate of the clipping region's top edge.
  10879.  
  10880.    maxy is the screen space y coordinate of the clipping region's bottom edge.
  10881.    It must be greater than or equal to the value of miny.
  10882.  
  10883. Return value
  10884.  
  10885.    none
  10886.  
  10887. Restrictions
  10888.  
  10889.    This routine has no effect in text video modes.
  10890.  
  10891. See also
  10892.  
  10893.    fg_setclipw
  10894.  
  10895. Examples
  10896.  
  10897.    6-5, 6-8, 10-8, 10-9, 10-17, 12-4
  10898.  
  10899.  
  10900.  
  10901.  
  10902.  
  10903.  
  10904.  
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.  
  10913.  
  10914.                                      180
  10915. fg_setclipw
  10916.  
  10917. Prototype
  10918.  
  10919.    void fg_setclipw (double xmin, double xmax, double ymin, double ymax);
  10920.    sub FGsetclipw (xmin#, xmax#, ymin#, ymax#)
  10921.    subroutine fg_setclipw (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  10922.    procedure fg_setclipw (xmin, xmax, ymin, ymax : real);
  10923.  
  10924. Description
  10925.  
  10926.    The fg_setclipw routine defines the clipping region in world space.  The
  10927.    clipping region is a rectangular area outside of which graphics are
  10928.    suppressed.
  10929.  
  10930. Parameters
  10931.  
  10932.    xmin is the world space x coordinate of the clipping region's left edge.
  10933.  
  10934.    xmax is the world space x coordinate of the clipping region's right edge.
  10935.    It must be greater than or equal to the value of xmin.
  10936.  
  10937.    ymin is the world space y coordinate of the clipping region's bottom edge.
  10938.  
  10939.    ymax is the world space y coordinate of the clipping region's top edge.  It
  10940.    must be greater than or equal to the value of ymin.
  10941.  
  10942. Return value
  10943.  
  10944.    none
  10945.  
  10946. Restrictions
  10947.  
  10948.    This routine is not available in Fastgraph/Light and has no effect in text
  10949.    video modes.
  10950.  
  10951. See also
  10952.  
  10953.    fg_setclip
  10954.  
  10955.  
  10956.  
  10957.  
  10958.  
  10959.  
  10960.  
  10961.  
  10962.  
  10963.  
  10964.  
  10965.  
  10966.  
  10967.  
  10968.  
  10969.  
  10970.  
  10971.  
  10972.  
  10973.                                      181
  10974. fg_setcolor
  10975.  
  10976. Prototype
  10977.  
  10978.    void fg_setcolor (int color);
  10979.    sub FGsetcolor (color%)
  10980.    subroutine fg_setcolor (i*2 color)
  10981.    procedure fg_setcolor (color : integer);
  10982.  
  10983. Description
  10984.  
  10985.    The fg_setcolor routine establishes the current color index (which may be a
  10986.    virtual color index) in graphics modes.  In text modes, fg_setcolor
  10987.    provides an alternate method of defining the current text attribute.
  10988.  
  10989. Parameters
  10990.  
  10991.    color defines the current color index (in graphics modes) or text attribute
  10992.    (in text modes).  Its value must be between 0 and 255.
  10993.  
  10994. Return value
  10995.  
  10996.    none
  10997.  
  10998. Restrictions
  10999.  
  11000.    none
  11001.  
  11002. See also
  11003.  
  11004.    fg_defcolor, fg_getcolor, fg_setattr
  11005.  
  11006. Examples
  11007.  
  11008.    3-1 to 3-8, 3-10
  11009.  
  11010.  
  11011.  
  11012.  
  11013.  
  11014.  
  11015.  
  11016.  
  11017.  
  11018.  
  11019.  
  11020.  
  11021.  
  11022.  
  11023.  
  11024.  
  11025.  
  11026.  
  11027.  
  11028.  
  11029.  
  11030.  
  11031.  
  11032.                                      182
  11033. fg_setdacs
  11034.  
  11035. Prototype
  11036.  
  11037.    void fg_setdacs (int start, int count, char *values);
  11038.    sub FGsetdacs (start%, count%, values$)
  11039.    subroutine fg_setdacs (i*2 start, i*2 count, i*1 values)
  11040.    procedure fg_setdacs (start, count : integer; var values : shortint);
  11041.  
  11042. Description
  11043.  
  11044.    The fg_setdacs routine defines the values of a block of contiguous video
  11045.    DAC registers by specifying their red, green, and blue color components.
  11046.    Defining many DAC registers with fg_setdacs is considerably faster than
  11047.    doing so individually with fg_setrgb.
  11048.  
  11049. Parameters
  11050.  
  11051.    start is the starting video DAC register number, between 0 and 255.
  11052.  
  11053.    count is the number of contiguous DAC registers to define, between 1 and
  11054.    256.  If the sum of start and count exceeds 255, the register numbers wrap
  11055.    around and resume with register number 0.
  11056.  
  11057.    values is the array containing the color components.  The first three bytes
  11058.    of this array must contain the red, green, and blue components for DAC
  11059.    register start, the next three bytes contain the components for register
  11060.    start+1, and so forth.  The size of the values array must be at least
  11061.    3*count bytes.
  11062.  
  11063. Return value
  11064.  
  11065.    none
  11066.  
  11067. Restrictions
  11068.  
  11069.    This routine has no effect in text modes, or in CGA, Tandy, and Hercules
  11070.    graphics modes.  In modes 13 to 16, it is meaningful only when run on a VGA
  11071.    or SVGA system; its results are unpredictable in these modes when run on an
  11072.    EGA.  You can use fg_testmode(18,0) to check for a VGA or SVGA system.
  11073.  
  11074. See also
  11075.  
  11076.    fg_getdacs, fg_getrgb, fg_setrgb
  11077.  
  11078. Examples
  11079.  
  11080.    5-12
  11081.  
  11082.  
  11083.  
  11084.  
  11085.  
  11086.  
  11087.  
  11088.  
  11089.  
  11090.  
  11091.                                      183
  11092. fg_setentry
  11093.  
  11094. Prototype
  11095.  
  11096.    void fg_setentry (int page_number, int page_addr, int page_type);
  11097.    sub FGsetentry (page_number%, page_addr%, page_type%)
  11098.    subroutine fg_setentry (i*2 page_number, i*2 page_addr, i*2 page_type)
  11099.    procedure fg_setentry (page_number, page_addr, page_type : integer);
  11100.  
  11101. Description
  11102.  
  11103.    The fg_setentry routine specifies the type and address of a physical,
  11104.    virtual, or logical video page.  For logical pages, it further specifies if
  11105.    the page resides in conventional, expanded, or extended memory.  This
  11106.    routine is useful for saving virtual or logical page contents across video
  11107.    mode changes, or for manual creation of virtual and logical pages.
  11108.  
  11109. Parameters
  11110.  
  11111.    page_number is the number of the video page being defined.  It must be
  11112.    between 0 and 63.
  11113.  
  11114.    page_addr is the address of the specified page.  For physical pages,
  11115.    virtual pages, and logical pages in conventional memory, the address is an
  11116.    ordinary segment address.  For logical pages in EMS or XMS memory, the page
  11117.    address is an EMS or XMS handle.
  11118.  
  11119.    page_type is a code indicating the page type.  See the description of the
  11120.    fg_getentry routine for valid page type values.
  11121.  
  11122. Return value
  11123.  
  11124.    none
  11125.  
  11126. Restrictions
  11127.  
  11128.    none
  11129.  
  11130. See also
  11131.  
  11132.    fg_getentry
  11133.  
  11134. Examples
  11135.  
  11136.    8-11, 8-12
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.                                      184
  11151. fg_setfunc
  11152.  
  11153. Prototype
  11154.  
  11155.    void fg_setfunc (int mode);
  11156.    sub FGsetfunc (mode%)
  11157.    subroutine fg_setfunc (i*2 mode)
  11158.    procedure fg_setfunc (mode : integer);
  11159.  
  11160. Description
  11161.  
  11162.    The fg_setfunc routine specifies the logical operation applied when video
  11163.    memory changes in 16-color EGA/VGA/SVGA graphics modes.  Replacement mode
  11164.    is selected after you use the fg_setmode routine to establish a video mode.
  11165.  
  11166. Parameters
  11167.  
  11168.    mode defines the logical operation, as shown below.
  11169.  
  11170.                      value of        logical
  11171.                        mode         operation
  11172.  
  11173.                          0         replacement
  11174.                          1             and
  11175.                          2             or
  11176.                          3        exclusive or
  11177.  
  11178. Return value
  11179.  
  11180.    none
  11181.  
  11182. Restrictions
  11183.  
  11184.    This routine only functions in 16-color EGA/VGA/SVGA graphics video modes
  11185.    (modes 13 through 18, 28, and 29).
  11186.  
  11187. Examples
  11188.  
  11189.    12-3, 17-2
  11190.  
  11191.  
  11192.  
  11193.  
  11194.  
  11195.  
  11196.  
  11197.  
  11198.  
  11199.  
  11200.  
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.                                      185
  11210. fg_sethpage
  11211.  
  11212. Prototype
  11213.  
  11214.    void fg_sethpage (int page_number);
  11215.    sub FGsethpage (page_number%)
  11216.    subroutine fg_sethpage (i*2 page_number)
  11217.    procedure fg_sethpage (page_number : integer);
  11218.  
  11219. Description
  11220.  
  11221.    The fg_sethpage routine establishes the hidden video page.  It may be a
  11222.    physical or virtual video page.  The fg_setmode routine designates video
  11223.    page 0 as the hidden page.
  11224.  
  11225. Parameters
  11226.  
  11227.    page_number is the hidden video page number, between 0 and 63.
  11228.  
  11229. Return value
  11230.  
  11231.    none
  11232.  
  11233. Restrictions
  11234.  
  11235.    This routine has no effect if page_number references a physical video page
  11236.    that does not exist, or a virtual video page that has not been created.
  11237.  
  11238. See also
  11239.  
  11240.    fg_gethpage, fg_setpage, fg_setvpage
  11241.  
  11242. Examples
  11243.  
  11244.    11-2, 11-3, 13-2, 13-5
  11245.  
  11246.  
  11247.  
  11248.  
  11249.  
  11250.  
  11251.  
  11252.  
  11253.  
  11254.  
  11255.  
  11256.  
  11257.  
  11258.  
  11259.  
  11260.  
  11261.  
  11262.  
  11263.  
  11264.  
  11265.  
  11266.  
  11267.  
  11268.                                      186
  11269. fg_setlines
  11270.  
  11271. Prototype
  11272.  
  11273.    void fg_setlines (int lines);
  11274.    sub FGsetlines (lines%)
  11275.    subroutine fg_setlines (i*2 lines)
  11276.    procedure fg_setlines (lines : integer);
  11277.  
  11278. Description
  11279.  
  11280.    The fg_setlines routine extends an 80-column text mode to 25, 43, or 50
  11281.    lines per screen.  The fg_setmode routine sets the number of lines to 25
  11282.    when establishing an 80-column text mode.
  11283.  
  11284. Parameters
  11285.  
  11286.    lines is the number of text rows per screen.  On EGA systems, the value of
  11287.    lines must be 25 or 43.  On MCGA systems, it must be 25 or 50.  On VGA and
  11288.    SVGA systems, it must be 25, 43, or 50.  Any other value is ignored.
  11289.    Before calling fg_setlines, you should call fg_testmode with pages=0 to see
  11290.    if the user's system supports the number of rows needed.
  11291.  
  11292. Return value
  11293.  
  11294.    none
  11295.  
  11296. Restrictions
  11297.  
  11298.    This routine is only meaningful when running in 80-column text modes on
  11299.    EGA, MCGA, VGA, or SVGA systems (in other cases it does nothing).
  11300.  
  11301.    When you call fg_setlines, the visual page must be page 0.
  11302.  
  11303.    Calling fg_setlines makes the text cursor visible.
  11304.  
  11305.    If you have initialized the mouse (with fg_mouseini), joysticks (with
  11306.    fg_initjoy), expanded memory (with fg_initems), or extended memory (with
  11307.    fg_initxms), you should re-initialize these resources after calling
  11308.    fg_setlines.
  11309.  
  11310. See also
  11311.  
  11312.    fg_getlines, fg_testmode
  11313.  
  11314. Examples
  11315.  
  11316.    3-5
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.  
  11326.  
  11327.                                      187
  11328. fg_setmode
  11329.  
  11330. Prototype
  11331.  
  11332.    void fg_setmode (int mode_number);
  11333.    sub FGsetmode (mode_number%)
  11334.    subroutine fg_setmode (i*2 mode_number)
  11335.    procedure fg_setmode (mode_number : integer);
  11336.  
  11337. Description
  11338.  
  11339.    The fg_setmode routine establishes a video mode and initializes Fastgraph's
  11340.    internal parameters for that mode.  It must be called before any Fastgraph
  11341.    routine that performs video output.  A program can call fg_setmode as many
  11342.    times as needed to switch between different video modes.
  11343.  
  11344. Parameters
  11345.  
  11346.    mode_number is the video mode number, between 0 and 29, as shown below.
  11347.  
  11348. Mode                     No. of    Supported                Supported
  11349. No.  Type Resolution     Colors    Adapters                 Displays
  11350.  
  11351.  0   T    40 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11352.  1   T    40 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11353.  2   T    80 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11354.  3   T    80 x 25        16/8      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11355.  4   G    320 x 200      4         CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11356.  5   G    320 x 200      4         CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11357.  6   G    640 x 200      2/16      CGA,EGA,VGA,MCGA,SVGA    RGB,ECD,VGA,SVGA
  11358.  7   T    80 x 25        b/w       MDA,HGC,EGA,VGA,SVGA     Monochrome
  11359.  9   G    320 x 200      16        Tandy 1000,PCjr          RGB
  11360. 11   G    720 x 348      b/w       HGC                      Monochrome
  11361. 12   G    320 x 200      b/w       HGC                      Monochrome
  11362. 13   G    320 x 200      16        EGA,VGA,SVGA             RGB,ECD,VGA,SVGA
  11363. 14   G    640 x 200      16        EGA,VGA,SVGA             RGB,ECD,VGA,SVGA
  11364. 15   G    640 x 350      b/w       EGA,VGA,SVGA             Mono,VGA,SVGA
  11365. 16   G    640 x 350      16/64     EGA,VGA,SVGA             ECD,VGA,SVGA
  11366. 17   G    640 x 480      2/256K    VGA,MCGA,SVGA            VGA,SVGA
  11367. 18   G    640 x 480      16/256K   VGA,SVGA                 VGA,SVGA
  11368. 19   G    320 x 200      256/256K  VGA,MCGA,SVGA            VGA,SVGA
  11369. 20   G    320 x 200      256/256K  VGA,SVGA                 VGA,SVGA
  11370. 21   G    320 x 400      256/256K  VGA,SVGA                 VGA,SVGA
  11371. 22   G    320 x 240      256/256K  VGA,SVGA                 VGA,SVGA
  11372. 23   G    320 x 480      256/256K  VGA,SVGA                 VGA,SVGA
  11373. 24   G    640 x 400      256/256K  SVGA                     SVGA
  11374. 25   G    640 x 480      256/256K  SVGA                     SVGA
  11375. 26   G    800 x 600      256/256K  SVGA                     SVGA
  11376. 27   G    1024 x 768     256/256K  SVGA                     SVGA
  11377. 28   G    800 x 600      16/256K   SVGA                     SVGA
  11378. 29   G    1024 x 768     16/256K   SVGA                     SVGA
  11379.  
  11380.    For more information about each video mode, including their required
  11381.    display adapters (graphics cards) and monitors, please refer to the
  11382.    Fastgraph User's Guide.
  11383.  
  11384.  
  11385.  
  11386.                                      188
  11387. fg_setmode (continued)
  11388.  
  11389. Parameters (continued)
  11390.  
  11391.    The value of the mode_number parameter also can be -1, which tells
  11392.    Fastgraph to use the current video mode.  This feature is often useful in
  11393.    programs that use only text video modes, programs executed from another
  11394.    program, or terminate and stay resident (TSR) programs.
  11395.  
  11396. Return value
  11397.  
  11398.    none
  11399.  
  11400. Restrictions
  11401.  
  11402.    The fg_setmode routine does not check if the specified video mode is
  11403.    available on the user's system.  If necessary, you should first use the
  11404.    fg_testmode routine to do this.
  11405.  
  11406.    SVGA graphics modes (24 to 29) are only available after successfully
  11407.    initializing the SVGA kernel with fg_svgainit.
  11408.  
  11409. See also
  11410.  
  11411.    fg_automode, fg_bestmode, fg_svgainit, fg_testmode
  11412.  
  11413. Examples
  11414.  
  11415.    3-1 to 3-8, 3-10
  11416.  
  11417.  
  11418.  
  11419.  
  11420.  
  11421.  
  11422.  
  11423.  
  11424.  
  11425.  
  11426.  
  11427.  
  11428.  
  11429.  
  11430.  
  11431.  
  11432.  
  11433.  
  11434.  
  11435.  
  11436.  
  11437.  
  11438.  
  11439.  
  11440.  
  11441.  
  11442.  
  11443.  
  11444.  
  11445.                                      189
  11446. fg_setnum
  11447.  
  11448. Prototype
  11449.  
  11450.    void fg_setnum (int state);
  11451.    sub FGsetnum (state%)
  11452.    subroutine fg_setnum (i*2 state)
  11453.    procedure fg_setnum (state : integer);
  11454.  
  11455. Description
  11456.  
  11457.    The fg_setnum routine controls the state of the NumLock key.
  11458.  
  11459. Parameters
  11460.  
  11461.    state defines the NumLock key state.  If state is 0, the NumLock key is
  11462.    turned off.  If it is 1, the NumLock key is turned on.
  11463.  
  11464. Return value
  11465.  
  11466.    none
  11467.  
  11468. Restrictions
  11469.  
  11470.    On most keyboards, changing the NumLock key state will also change the
  11471.    keyboard state light to reflect the new key state.  However, some older
  11472.    keyboards, especially when used on PC, PC/XT, or Tandy 1000 systems, do not
  11473.    update the state light.  This makes the state light inconsistent with the
  11474.    true key state.
  11475.  
  11476. See also
  11477.  
  11478.    fg_capslock, fg_numlock, fg_scrlock, fg_setcaps
  11479.  
  11480. Examples
  11481.  
  11482.    14-4
  11483.  
  11484.  
  11485.  
  11486.  
  11487.  
  11488.  
  11489.  
  11490.  
  11491.  
  11492.  
  11493.  
  11494.  
  11495.  
  11496.  
  11497.  
  11498.  
  11499.  
  11500.  
  11501.  
  11502.  
  11503.  
  11504.                                      190
  11505. fg_setpage
  11506.  
  11507. Prototype
  11508.  
  11509.    void fg_setpage (int page_number);
  11510.    sub FGsetpage (page_number%)
  11511.    subroutine fg_setpage (i*2 page_number)
  11512.    procedure fg_setpage (page_number : integer);
  11513.  
  11514. Description
  11515.  
  11516.    The fg_setpage routine establishes the active video page.  It may be a
  11517.    physical or virtual video page.  The fg_setmode routine designates video
  11518.    page 0 as the active page.
  11519.  
  11520. Parameters
  11521.  
  11522.    page_number is the active video page number, between 0 and 63.
  11523.  
  11524. Return value
  11525.  
  11526.    none
  11527.  
  11528. Restrictions
  11529.  
  11530.    This routine has no effect if page_number references a physical video page
  11531.    that does not exist, or a virtual video page that has not been created.
  11532.  
  11533. See also
  11534.  
  11535.    fg_getpage, fg_sethpage, fg_setvpage
  11536.  
  11537. Examples
  11538.  
  11539.    8-1 to 8-8, 8-12, 12-4, 12-5, 12-6, 13-2
  11540.  
  11541.  
  11542.  
  11543.  
  11544.  
  11545.  
  11546.  
  11547.  
  11548.  
  11549.  
  11550.  
  11551.  
  11552.  
  11553.  
  11554.  
  11555.  
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.  
  11562.  
  11563.                                      191
  11564. fg_setratio
  11565.  
  11566. Prototype
  11567.  
  11568.    void fg_setratio (double ratio);
  11569.    sub FGsetratio (ratio#)
  11570.    subroutine fg_setratio (r*8 ratio)
  11571.    procedure fg_setratio (ratio : real);
  11572.  
  11573. Description
  11574.  
  11575.    The fg_setratio routine defines the aspect ratio for software characters.
  11576.    The aspect ratio is the ratio of character width to character height.  If a
  11577.    program draws software characters before calling fg_setratio, Fastgraph
  11578.    will use its default aspect ratio of 1.
  11579.  
  11580. Parameters
  11581.  
  11582.    ratio is the aspect ratio.  It must be greater than zero.
  11583.  
  11584. Return value
  11585.  
  11586.    none
  11587.  
  11588. Restrictions
  11589.  
  11590.    This routine is not available in Fastgraph/Light.  Before using this
  11591.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11592.    world space coordinate system.
  11593.  
  11594. See also
  11595.  
  11596.    fg_initw, fg_setangle, fg_setsize, fg_setsizew, fg_setworld, fg_swchar,
  11597.    fg_swlength, fg_swtext
  11598.  
  11599. Examples
  11600.  
  11601.    7-11
  11602.  
  11603.  
  11604.  
  11605.  
  11606.  
  11607.  
  11608.  
  11609.  
  11610.  
  11611.  
  11612.  
  11613.  
  11614.  
  11615.  
  11616.  
  11617.  
  11618.  
  11619.  
  11620.  
  11621.  
  11622.                                      192
  11623. fg_setrgb
  11624.  
  11625. Prototype
  11626.  
  11627.    void fg_setrgb (int number, int red, int green, int blue);
  11628.    sub FGsetrgb (number%, red%, green%, blue%)
  11629.    subroutine fg_setrgb (i*2 number, i*2 red, i*2 green, i*2 blue)
  11630.    procedure fg_setrgb (number, red, green, blue : integer);
  11631.  
  11632. Description
  11633.  
  11634.    The fg_setrgb defines the value of a palette register (in Tandy/PCjr and
  11635.    EGA graphics modes) or video DAC register (in VGA, MCGA, XVGA, and SVGA
  11636.    graphics modes) by specifying its red, green, and blue color components.
  11637.  
  11638. Parameters
  11639.  
  11640.    number is the palette or video DAC register number.  If it references a
  11641.    palette register, it must be between 0 and 15 (0 and 1 in mode 17).  If it
  11642.    references a video DAC register, it must be between 0 and 255.  The value
  11643.    of number may be negative to specify an intense color for that palette
  11644.    register in Tandy/PCjr and 200-line EGA graphics modes.
  11645.  
  11646.    red, green, and blue respectively specify the red, green, and blue
  11647.    components of the specified palette or video DAC register.  These values
  11648.    must be 0 or 1 for Tandy/PCjr and 200-line EGA graphics modes, between 0
  11649.    and 3 for 350-line EGA modes, and between 0 and 63 for VGA, MCGA, XVGA, and
  11650.    SVGA modes.
  11651.  
  11652. Return value
  11653.  
  11654.    none
  11655.  
  11656. Restrictions
  11657.  
  11658.    This routine has no effect in text video modes, CGA graphics modes, or
  11659.    Hercules graphics modes.
  11660.  
  11661. See also
  11662.  
  11663.    fg_getrgb, fg_palette, fg_setcolor, fg_setdacs
  11664.  
  11665. Examples
  11666.  
  11667.    5-9, 5-11, 5-13, 5-16, 9-6
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.  
  11680.  
  11681.                                      193
  11682. fg_setsize
  11683.  
  11684. Prototype
  11685.  
  11686.    void fg_setsize (int isize);
  11687.    sub FGsetsize (isize%)
  11688.    subroutine fg_setsize (i*2 isize)
  11689.    procedure fg_setsize (isize : integer);
  11690.  
  11691. Description
  11692.  
  11693.    The fg_setsize routine defines the height of software characters in screen
  11694.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  11695.    will use its default character height of one world space unit.
  11696.  
  11697. Parameters
  11698.  
  11699.    isize is the character height in screen space units.
  11700.  
  11701. Return value
  11702.  
  11703.    none
  11704.  
  11705. Restrictions
  11706.  
  11707.    This routine is not available in Fastgraph/Light.  Before using this
  11708.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11709.    world space coordinate system.
  11710.  
  11711. See also
  11712.  
  11713.    fg_initw, fg_setangle, fg_setratio, fg_setsizew, fg_setworld, fg_swchar,
  11714.    fg_swlength, fg_swtext
  11715.  
  11716.  
  11717.  
  11718.  
  11719.  
  11720.  
  11721.  
  11722.  
  11723.  
  11724.  
  11725.  
  11726.  
  11727.  
  11728.  
  11729.  
  11730.  
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.  
  11739.  
  11740.                                      194
  11741. fg_setsizew
  11742.  
  11743. Prototype
  11744.  
  11745.    void fg_setsizew (double size);
  11746.    sub FGsetsizew (size#)
  11747.    subroutine fg_setsizew (r*8 size)
  11748.    procedure fg_setsizew (size : real);
  11749.  
  11750. Description
  11751.  
  11752.    The fg_setsizew routine defines the height of software characters in world
  11753.    space units.  If neither fg_setsize nor fg_setsizew is called, Fastgraph
  11754.    will use its default character height of one world space unit.
  11755.  
  11756. Parameters
  11757.  
  11758.    size is the character height in world space units.
  11759.  
  11760. Return value
  11761.  
  11762.    none
  11763.  
  11764. Restrictions
  11765.  
  11766.    This routine is not available in Fastgraph/Light.  Before using this
  11767.    routine, you must use the fg_initw and fg_setworld routines to establish a
  11768.    world space coordinate system.
  11769.  
  11770. See also
  11771.  
  11772.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setworld, fg_swchar,
  11773.    fg_swlength, fg_swtext
  11774.  
  11775. Examples
  11776.  
  11777.    7-10, 7-11, 7-12, 7-13
  11778.  
  11779.  
  11780.  
  11781.  
  11782.  
  11783.  
  11784.  
  11785.  
  11786.  
  11787.  
  11788.  
  11789.  
  11790.  
  11791.  
  11792.  
  11793.  
  11794.  
  11795.  
  11796.  
  11797.  
  11798.  
  11799.                                      195
  11800. fg_setvpage
  11801.  
  11802. Prototype
  11803.  
  11804.    void fg_setvpage (int page_number);
  11805.    sub FGsetvpage (page_number%)
  11806.    subroutine fg_setvpage (i*2 page_number)
  11807.    procedure fg_setvpage (page_number : integer);
  11808.  
  11809. Description
  11810.  
  11811.    The fg_setvpage routine establishes the visual video page.  It may be a
  11812.    physical or virtual video page, but not a logical page.  The fg_setmode
  11813.    routine designates video page 0 as the visual page.
  11814.  
  11815. Parameters
  11816.  
  11817.    page_number is the visual video page number, between 0 and 63.
  11818.  
  11819. Return value
  11820.  
  11821.    none
  11822.  
  11823. Restrictions
  11824.  
  11825.    This routine has no effect if page_number references a physical video page
  11826.    that does not exist, or a virtual video page that has not been created.
  11827.  
  11828. See also
  11829.  
  11830.    fg_getpage, fg_sethpage, fg_setpage
  11831.  
  11832. Examples
  11833.  
  11834.    8-1 to 8-7, 12-6
  11835.  
  11836.  
  11837.  
  11838.  
  11839.  
  11840.  
  11841.  
  11842.  
  11843.  
  11844.  
  11845.  
  11846.  
  11847.  
  11848.  
  11849.  
  11850.  
  11851.  
  11852.  
  11853.  
  11854.  
  11855.  
  11856.  
  11857.  
  11858.                                      196
  11859. fg_setworld
  11860.  
  11861. Prototype
  11862.  
  11863.    void fg_setworld (double xmin, double xmax, double ymin, double ymax);
  11864.    sub FGsetworld (xmin#, xmax#, ymin#, ymax#)
  11865.    subroutine fg_setworld (r*8 xmin, r*8 xmax, r*8 ymin, r*8 ymax)
  11866.    procedure fg_setworld (xmin, xmax, ymin, ymax : real);
  11867.  
  11868. Description
  11869.  
  11870.    The fg_setworld routine defines the world space coordinates that correspond
  11871.    to the physical edges of the screen.
  11872.  
  11873. Parameters
  11874.  
  11875.    xmin is the world space coordinate of the screen's left edge.
  11876.  
  11877.    xmax is the world space coordinate of the screen's right edge.  It must be
  11878.    greater than the value of xmin.
  11879.  
  11880.    ymin is the world space coordinate of the screen's top edge.
  11881.  
  11882.    ymax is the world space coordinate of the screen's bottom edge.  It must be
  11883.    greater than the value of ymin.
  11884.  
  11885. Return value
  11886.  
  11887.    none
  11888.  
  11889. Restrictions
  11890.  
  11891.    This routine is not available in Fastgraph/Light.  Before using this
  11892.    routine, you must call the fg_initw routine to initialize Fastgraph's world
  11893.    space parameters.
  11894.  
  11895. See also
  11896.  
  11897.    fg_getworld, fg_initw
  11898.  
  11899. Examples
  11900.  
  11901.    4-3, 6-4, 6-9, 7-10, 7-11, 7-12, 7-13
  11902.  
  11903.  
  11904.  
  11905.  
  11906.  
  11907.  
  11908.  
  11909.  
  11910.  
  11911.  
  11912.  
  11913.  
  11914.  
  11915.  
  11916.  
  11917.                                      197
  11918. fg_showgif
  11919.  
  11920. Prototype
  11921.  
  11922.    int fg_showgif (char *filename, int flags);
  11923.    function FGshowgif% (filename$, flags%)
  11924.    i*2 function fg_showgif (c*(*) filename, i*2 flags)
  11925.    function fg_showgif (filename : string; flags : integer) : integer;
  11926.  
  11927. Description
  11928.  
  11929.    The fg_showgif routine displays an image stored in a GIF file.  By default,
  11930.    the image will be positioned so that its upper left corner is at the
  11931.    graphics cursor position of the active video page.
  11932.  
  11933. Parameters
  11934.  
  11935.    filename specifies the name of the GIF file.  A device and path name may be
  11936.    included as part of the file name.  The file name must be terminated by a
  11937.    zero byte.
  11938.  
  11939.    flags is a bit mask that controls how the image is displayed.
  11940.      Bit 0
  11941.         0 = use palette values stored in the GIF file
  11942.         1 = use the current palette settings
  11943.      Bit 1
  11944.         0 = display image at position indicated in GIF header
  11945.         1 = display image at current graphics position
  11946.      Bits 2-15 are reserved for future use and should be zero.
  11947.  
  11948. Return value
  11949.  
  11950.    0 = success
  11951.    1 = file not found
  11952.    2 = file is not a GIF file
  11953.  
  11954. Restrictions
  11955.  
  11956.    This routine has no effect in text video modes, or the CGA and Hercules
  11957.    graphics modes.
  11958.  
  11959.    When displaying a 256-color GIF in a 16-color graphics mode, fg_showgif
  11960.    displays pixels of color c in color c mod 16.
  11961.  
  11962. See also
  11963.  
  11964.    fg_imagebuf, fg_makegif, fg_showpcx, fg_showppr, fg_showspr
  11965.  
  11966. Examples
  11967.  
  11968.    9-3
  11969.  
  11970.  
  11971.  
  11972.  
  11973.  
  11974.  
  11975.  
  11976.                                      198
  11977. fg_showpcx
  11978.  
  11979. Prototype
  11980.  
  11981.    int fg_showpcx (char *filename, int flags);
  11982.    function FGshowpcx% (filename$, flags%)
  11983.    i*2 function fg_showpcx (c*(*) filename, i*2 flags)
  11984.    function fg_showpcx (filename : string; flags : integer) : integer;
  11985.  
  11986. Description
  11987.  
  11988.    The fg_showpcx routine displays an image stored in a PCX file.  By default,
  11989.    the image will be positioned so that its upper left corner is at the
  11990.    graphics cursor position of the active video page.
  11991.  
  11992. Parameters
  11993.  
  11994.    filename is the name of the PCX file.  A device and path name may be
  11995.    included as part of the file name.  The file name must be terminated by a
  11996.    null character (that is, a zero byte).
  11997.  
  11998.    flags is a bit mask that controls how the image is displayed.
  11999.      Bit 0
  12000.         0 = use palette values stored in the PCX file
  12001.         1 = use the current palette settings
  12002.      Bit 1
  12003.         0 = display image at position indicated in PCX header
  12004.         1 = display image at current graphics position
  12005.      Bits 2-15 are reserved for future use and should be zero.
  12006.  
  12007. Return value
  12008.  
  12009.    0 = success
  12010.    1 = file not found
  12011.    2 = file is not a PCX file
  12012.  
  12013. Restrictions
  12014.  
  12015.    PCX files are specific to certain video modes.  The following table
  12016.    summarizes the compatible video modes for PCX files.
  12017.  
  12018.                     If PCX file was     You can display
  12019.                     created in mode     it in these modes
  12020.  
  12021.                     4, 5                4, 5
  12022.                     6, 11               6, 11, 13-18, 28, 29
  12023.                     9                   9
  12024.                     13-18               13-18, 28, 29
  12025.                     19-27               19-27
  12026.                     28-29               13-18, 28, 29
  12027.  
  12028.    Displaying a PCX file at a lower resolution (for example, a 640x480 PCX
  12029.    file at 320x200) will truncate the display on the right and on the bottom.
  12030.    This effectively displays the upper left corner of the PCX file.  If you
  12031.    attempt to display a PCX file in an incompatible video mode, fg_showpcx
  12032.    will still display something, but it will be garbled.
  12033.  
  12034.  
  12035.                                      199
  12036. fg_showpcx (continued)
  12037.  
  12038. Restrictions (continued)
  12039.  
  12040.    The fg_showpcx routine has no effect in text video modes or in the Hercules
  12041.    low-resolution graphics mode.
  12042.  
  12043. See also
  12044.  
  12045.    fg_imagebuf, fg_makepcx, fg_showgif, fg_showppr, fg_showspr
  12046.  
  12047. Examples
  12048.  
  12049.    9-1, 9-7
  12050.  
  12051.  
  12052.  
  12053.  
  12054.  
  12055.  
  12056.  
  12057.  
  12058.  
  12059.  
  12060.  
  12061.  
  12062.  
  12063.  
  12064.  
  12065.  
  12066.  
  12067.  
  12068.  
  12069.  
  12070.  
  12071.  
  12072.  
  12073.  
  12074.  
  12075.  
  12076.  
  12077.  
  12078.  
  12079.  
  12080.  
  12081.  
  12082.  
  12083.  
  12084.  
  12085.  
  12086.  
  12087.  
  12088.  
  12089.  
  12090.  
  12091.  
  12092.  
  12093.  
  12094.                                      200
  12095. fg_showppr
  12096.  
  12097. Prototype
  12098.  
  12099.    int fg_showppr (char *filename, int width);
  12100.    function FGshowppr% (filename$, width%)
  12101.    i*2 function fg_showppr (c*(*) filename, i*2 width)
  12102.    function fg_showppr (filename : string; width : integer) : integer;
  12103.  
  12104. Description
  12105.  
  12106.    The fg_showppr routine displays an image stored in a packed pixel run (PPR)
  12107.    file.  The image will be positioned so that its lower left corner is at the
  12108.    graphics cursor position on the active video page.
  12109.  
  12110. Parameters
  12111.  
  12112.    filename specifies the name of the PPR file.  A device and path name may be
  12113.    included as part of the file name.  The file name must be terminated by a
  12114.    zero byte.
  12115.  
  12116.    width is the width of the image in pixels.  It must be greater than zero.
  12117.  
  12118. Return value
  12119.  
  12120.    0 = success
  12121.    1 = file not found
  12122.  
  12123. Restrictions
  12124.  
  12125.    This routine has no effect in text video modes or in 256-color graphics
  12126.    modes.
  12127.  
  12128. See also
  12129.  
  12130.    fg_dispfile, fg_imagebuf, fg_makeppr, fg_pattern, fg_showgif, fg_showpcx,
  12131.    fg_showspr
  12132.  
  12133. Examples
  12134.  
  12135.    9-6
  12136.  
  12137.  
  12138.  
  12139.  
  12140.  
  12141.  
  12142.  
  12143.  
  12144.  
  12145.  
  12146.  
  12147.  
  12148.  
  12149.  
  12150.  
  12151.  
  12152.  
  12153.                                      201
  12154. fg_showspr
  12155.  
  12156. Prototype
  12157.  
  12158.    int fg_showspr (char *filename, int width);
  12159.    function FGshowspr% (filename$, width%)
  12160.    i*2 function fg_showspr (c*(*) filename, i*2 width)
  12161.    function fg_showspr (filename : string; width : integer) : integer;
  12162.  
  12163. Description
  12164.  
  12165.    The fg_showspr routine displays an image stored in a standard pixel run
  12166.    (SPR) file.  The image will be positioned so that its lower left corner is
  12167.    at the graphics cursor position on the active video page.
  12168.  
  12169. Parameters
  12170.  
  12171.    filename specifies the name of the SPR file.  A device and path name may be
  12172.    included as part of the file name.  The file name must be terminated by a
  12173.    zero byte.
  12174.  
  12175.    width is the width of the image in pixels.  It must be greater than zero.
  12176.  
  12177. Return value
  12178.  
  12179.    0 = success
  12180.    1 = file not found
  12181.  
  12182. Restrictions
  12183.  
  12184.    This routine has no effect in text video modes.
  12185.  
  12186. See also
  12187.  
  12188.    fg_dispfile, fg_imagebuf, fg_makespr, fg_pattern, fg_showgif, fg_showpcx,
  12189.    fg_showppr
  12190.  
  12191. Examples
  12192.  
  12193.    9-4
  12194.  
  12195.  
  12196.  
  12197.  
  12198.  
  12199.  
  12200.  
  12201.  
  12202.  
  12203.  
  12204.  
  12205.  
  12206.  
  12207.  
  12208.  
  12209.  
  12210.  
  12211.  
  12212.                                      202
  12213. fg_sound
  12214.  
  12215. Prototype
  12216.  
  12217.    void fg_sound (int frequency, int duration);
  12218.    sub FGsound (frequency%, duration%)
  12219.    subroutine fg_sound (i*2 frequency, i*2 duration)
  12220.    procedure fg_sound (frequency, duration : integer);
  12221.  
  12222. Description
  12223.  
  12224.    The fg_sound routine produces a tone of a specified frequency and duration
  12225.    using the programmable timer.
  12226.  
  12227. Parameters
  12228.  
  12229.    frequency is tone's frequency in Hertz, between 18 and 32,767.
  12230.  
  12231.    duration is the tone's length in clock ticks (there are approximately 18.2
  12232.    clock ticks per second).  If duration is zero or negative, the tone is said
  12233.    to be continuous and will play until you stop it with the fg_quiet routine.
  12234.  
  12235. Return value
  12236.  
  12237.    none
  12238.  
  12239. Restrictions
  12240.  
  12241.    This routine has no effect if there is asynchronous sound already in
  12242.    progress.
  12243.  
  12244. See also
  12245.  
  12246.    fg_music, fg_quiet, fg_sounds, fg_voice
  12247.  
  12248. Examples
  12249.  
  12250.    15-1
  12251.  
  12252.  
  12253.  
  12254.  
  12255.  
  12256.  
  12257.  
  12258.  
  12259.  
  12260.  
  12261.  
  12262.  
  12263.  
  12264.  
  12265.  
  12266.  
  12267.  
  12268.  
  12269.  
  12270.  
  12271.                                      203
  12272. fg_sounds
  12273.  
  12274. Prototype
  12275.  
  12276.    void fg_sounds (int *sound_array, int ntimes);
  12277.    sub FGsounds (sound_array%(), ntimes%)
  12278.    subroutine fg_sounds (i*2 sound_array, i*2 ntimes)
  12279.    procedure fg_sounds (var sound_array : integer; ntimes : integer);
  12280.  
  12281. Description
  12282.  
  12283.    The fg_sounds routine uses the programmable timer to play a series of tones
  12284.    of specified frequencies and durations, concurrent with other activity.  It
  12285.    is the asynchronous version of the fg_sound routine.
  12286.  
  12287. Parameters
  12288.  
  12289.    sound_array is an arbitrary-length array containing a series of
  12290.    (frequency,duration) sound definitions.  The format of this array is:
  12291.  
  12292.  
  12293.                           [0]    frequency of sound 1
  12294.  
  12295.                           [1]    duration  of sound 1
  12296.  
  12297.                           [2]    frequency of sound 2
  12298.  
  12299.                           [3]    duration  of sound 2
  12300.                                           .
  12301.                                           .
  12302.                                           .
  12303.                                           .
  12304.                                           .
  12305.                        [2n-2]    frequency of sound n
  12306.  
  12307.                        [2n-1]    duration  of sound n
  12308.  
  12309.                          [2n]       terminator (0)
  12310.  
  12311.  
  12312.    Each frequency value is measured in Hertz and must be between 18 and
  12313.    32,767.  The durations are measured in clock ticks (there are approximately
  12314.    72.8 clock ticks per second).  A null character (that is, a zero byte)
  12315.    terminates the array.
  12316.  
  12317.    ntimes specifies the number of times to cycle through the sounds defined in
  12318.    sound_array.  If ntimes is negative, the sounds will play repetitively
  12319.    until stopped with the fg_hush or fg_hushnext routine.
  12320.  
  12321. Return value
  12322.  
  12323.    none
  12324.  
  12325.  
  12326.  
  12327.  
  12328.  
  12329.  
  12330.                                      204
  12331. fg_sounds (continued)
  12332.  
  12333. Restrictions
  12334.  
  12335.    This routine has no effect if there is asynchronous sound already in
  12336.    progress.  To expand the range of sound effects, Fastgraph temporarily
  12337.    quadruples the clock tick interrupt rate from 18.2 to 72.8 ticks per second
  12338.    while producing asynchronous sound.  Because many disk controllers rely on
  12339.    the 18.2 tick per second clock rate to synchronize disk accesses, your
  12340.    programs should not perform any disk operations when asynchronous sound is
  12341.    in progress.
  12342.  
  12343. See also
  12344.  
  12345.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sound, fg_voice, fg_voices
  12346.  
  12347. Examples
  12348.  
  12349.    15-4
  12350.  
  12351.  
  12352.  
  12353.  
  12354.  
  12355.  
  12356.  
  12357.  
  12358.  
  12359.  
  12360.  
  12361.  
  12362.  
  12363.  
  12364.  
  12365.  
  12366.  
  12367.  
  12368.  
  12369.  
  12370.  
  12371.  
  12372.  
  12373.  
  12374.  
  12375.  
  12376.  
  12377.  
  12378.  
  12379.  
  12380.  
  12381.  
  12382.  
  12383.  
  12384.  
  12385.  
  12386.  
  12387.  
  12388.  
  12389.                                      205
  12390. fg_stall
  12391.  
  12392. Prototype
  12393.  
  12394.    void fg_stall (int delay);
  12395.    sub FGstall (delay%)
  12396.    subroutine fg_stall (i*2 delay)
  12397.    procedure fg_stall (delay : integer);
  12398.  
  12399. Description
  12400.  
  12401.    The fg_stall routine delays a program's execution for a given number of
  12402.    processor-specific delay units.  You can use the fg_measure routine to
  12403.    obtain the number of delay units per clock tick for the system being used.
  12404.  
  12405. Parameters
  12406.  
  12407.    delay is the number of delay units to wait.
  12408.  
  12409. Return value
  12410.  
  12411.    none
  12412.  
  12413. Restrictions
  12414.  
  12415.    none
  12416.  
  12417. See also
  12418.  
  12419.    fg_measure, fg_waitfor
  12420.  
  12421. Examples
  12422.  
  12423.    16-3
  12424.  
  12425.  
  12426.  
  12427.  
  12428.  
  12429.  
  12430.  
  12431.  
  12432.  
  12433.  
  12434.  
  12435.  
  12436.  
  12437.  
  12438.  
  12439.  
  12440.  
  12441.  
  12442.  
  12443.  
  12444.  
  12445.  
  12446.  
  12447.  
  12448.                                      206
  12449. fg_suspend
  12450.  
  12451. Prototype
  12452.  
  12453.    void fg_suspend (void);
  12454.    sub FGsuspend ()
  12455.    subroutine fg_suspend ()
  12456.    procedure fg_suspend;
  12457.  
  12458. Description
  12459.  
  12460.    The fg_suspend routine suspends asynchronous music previously started by
  12461.    the fg_musicb routine.  It has no effect if there is no asynchronous music
  12462.    in progress.
  12463.  
  12464. Parameters
  12465.  
  12466.    none
  12467.  
  12468. Return value
  12469.  
  12470.    none
  12471.  
  12472. Restrictions
  12473.  
  12474.    A program must not exit to DOS with music suspended.  You must call fg_hush
  12475.    to cancel the music first.
  12476.  
  12477. See also
  12478.  
  12479.    fg_hush, fg_musicb, fg_resume
  12480.  
  12481. Examples
  12482.  
  12483.    15-8
  12484.  
  12485.  
  12486.  
  12487.  
  12488.  
  12489.  
  12490.  
  12491.  
  12492.  
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.                                      207
  12508. fg_svgainit
  12509.  
  12510. Prototype
  12511.  
  12512.    int fg_svgainit (int method);
  12513.    function FGsvgainit% (method%)
  12514.    i*2 function fg_svgainit (i*2 method)
  12515.    function fg_svgainit (method : integer) : integer;
  12516.  
  12517. Description
  12518.  
  12519.    The fg_svgainit routine initializes Fastgraph's SVGA kernel.  It must be
  12520.    called before establishing an SVGA graphics mode (modes 24 to 29) with
  12521.    fg_setmode, before testing SVGA video mode availability with fg_bestmode or
  12522.    fg_testmode, or before calling fg_memory.
  12523.  
  12524. Parameters
  12525.  
  12526.    method specifies how to initialize the SVGA kernel.  If method is 0, the
  12527.    SVGA kernel performs a chipset autodetect, giving chipset-specific code
  12528.    precedence over the VESA BIOS.  If method is 1, the SVGA kernel also
  12529.    performs an autodetect but gives the VESA BIOS precedence over chipset-
  12530.    specific code.  If method is 2 or more, the SVGA kernel is initialized for
  12531.    a specific chipset (without testing for presence of that chipset).  Refer
  12532.    to Chapter 3 of the Fastgraph User's Guide for a list of supported
  12533.    chipsets.
  12534.  
  12535. Return value
  12536.  
  12537.    For autodetect requests (method = 0 or 1), fg_svgainit returns a value
  12538.    between 1 and 22 corresponding to the SVGA chipset found.  A value of 1
  12539.    means a VESA BIOS will be used.  A value between 2 and 22 means a specific
  12540.    SVGA chipset will be used.  If no VESA BIOS or supported SVGA chipset is
  12541.    found, fg_svgainit returns zero.
  12542.  
  12543.    For specific chipsets, fg_svgainit returns the chipset value passed to it.
  12544.    No checks are made to see if that chipset is actually present.
  12545.  
  12546. Restrictions
  12547.  
  12548.    none
  12549.  
  12550. See also
  12551.  
  12552.    fg_setmode, fg_svgastat
  12553.  
  12554. Examples
  12555.  
  12556.    3-9, 3-10
  12557.  
  12558.  
  12559.  
  12560.  
  12561.  
  12562.  
  12563.  
  12564.  
  12565.  
  12566.                                      208
  12567.  
  12568. fg_svgastat
  12569.  
  12570. Prototype
  12571.  
  12572.    int fg_svgastat (void);
  12573.    function FGsvgastat% ()
  12574.    i*2 function fg_svgastat ()
  12575.    function fg_svgastat : integer;
  12576.  
  12577. Description
  12578.  
  12579.    Return information about the active SVGA chipset.
  12580.  
  12581. Parameters
  12582.  
  12583.    none
  12584.  
  12585. Return value
  12586.  
  12587.    A 16-bit mask containing information about the active SVGA chipset.
  12588.      Bit 0
  12589.         0 = SVGA kernel not initialized (all bits will be 0 in this case)
  12590.         1 = SVGA kernel initialized
  12591.      Bit 1
  12592.         0 = VESA support disabled
  12593.         1 = VESA support enabled
  12594.      Bit 2
  12595.         0 = Extended video pages are not available in modes 13-23
  12596.         1 = Extended video pages are available in these modes
  12597.      Bit 3
  12598.         0 = SVGA chipset uses one bank for reading and writing
  12599.         1 = SVGA chipset has separate read and write banks
  12600.      Bits 4-15 are reserved for future use and are all zero.
  12601.  
  12602. Restrictions
  12603.  
  12604.    none
  12605.  
  12606. See also
  12607.  
  12608.    fg_svgainit
  12609.  
  12610.  
  12611.  
  12612.  
  12613.  
  12614.  
  12615.  
  12616.  
  12617.  
  12618.  
  12619.  
  12620.  
  12621.  
  12622.  
  12623.  
  12624.  
  12625.                                      209
  12626. fg_svgaver
  12627.  
  12628. Prototype
  12629.  
  12630.    void fg_svgaver (int *major, int *minor);
  12631.    sub FGsvgaver (major%, minor%)
  12632.    subroutine fg_svgaver (i*2 major, i*2 minor)
  12633.    procedure fg_svgaver (var major, minor : integer);
  12634.  
  12635. Description
  12636.  
  12637.    The fg_svgaver routine returns the major and minor version numbers for
  12638.    Fastgraph's SVGA kernel.
  12639.  
  12640. Parameters
  12641.  
  12642.    major receives the SVGA kernel major version number.
  12643.  
  12644.    minor receives the SVGA kernel minor version number, expressed in
  12645.    hundredths.
  12646.  
  12647.  
  12648. Return value
  12649.  
  12650.    none
  12651.  
  12652. Restrictions
  12653.  
  12654.    none
  12655.  
  12656. See also
  12657.  
  12658.    fg_svgainit, fg_version
  12659.  
  12660. Examples
  12661.  
  12662.    3-9
  12663.  
  12664.  
  12665.  
  12666.  
  12667.  
  12668.  
  12669.  
  12670.  
  12671.  
  12672.  
  12673.  
  12674.  
  12675.  
  12676.  
  12677.  
  12678.  
  12679.  
  12680.  
  12681.  
  12682.  
  12683.  
  12684.                                      210
  12685. fg_swchar
  12686.  
  12687. Prototype
  12688.  
  12689.    void fg_swchar (char *string, int n, int justify);
  12690.    sub FGswchar (string$, n%, justify%)
  12691.    subroutine fg_swchar (c*(*) string, i*2 n, i*2 justify)
  12692.    procedure fg_swchar (string : string; n, justify : integer);
  12693.  
  12694. Description
  12695.  
  12696.    The fg_swchar routine displays a string of software characters in the
  12697.    current color index.  The string may be left justified, centered, or right
  12698.    justified relative to the graphics cursor.
  12699. Parameters
  12700.  
  12701.    string is the arbitrary-length sequence of characters to display.  It may
  12702.    contain special operators, as summarized in the following table.
  12703.  
  12704.                 operator      meaning
  12705.  
  12706.                     \         switch to other font
  12707.                    \^         superscript the next character
  12708.                    \v         subscript the next character
  12709.                     _         begin underlining characters until another
  12710.                               underscore character is encountered
  12711.  
  12712.    n is the number of characters in string, including any special operator
  12713.    characters.
  12714.  
  12715.    justify determines how string is positioned relative to the current
  12716.    position.  If justify is negative, string is left justified; if it is zero,
  12717.    string is centered; if it is positive, string is right justified.
  12718.  
  12719. Return value
  12720.  
  12721.    none
  12722.  
  12723. Restrictions
  12724.  
  12725.    Before using this routine, you must use the fg_initw and fg_setworld
  12726.    routines to establish a world space coordinate system.  This routine is not
  12727.    available in Fastgraph/Light and has no effect in text video modes.
  12728.  
  12729. See also
  12730.  
  12731.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12732.    fg_swlength, fg_swtext
  12733.  
  12734. Examples
  12735.  
  12736.    7-10, 7-11
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743.                                      211
  12744. fg_swlength
  12745.  
  12746. Prototype
  12747.  
  12748.    double fg_swlength (char *string, int n);
  12749.    function FGswlength# (string$, n%)
  12750.    r*8 function fg_swlength (c*(*) string, i*2 n)
  12751.    function fg_swlength (string : string; n : integer) : real;
  12752.  
  12753. Description
  12754.  
  12755.    The fg_swlength routine computes the length of a string of software
  12756.    characters.
  12757.  
  12758. Parameters
  12759.  
  12760.    string is the arbitrary-length sequence of characters for which to compute
  12761.    the length.  It may contain special operators used by the fg_swchar and
  12762.    fg_swtext routines.
  12763.  
  12764.    n is the number of characters in string, including any special operator
  12765.    characters.
  12766.  
  12767. Return value
  12768.  
  12769.    The length of string, in world space units.
  12770.  
  12771. Restrictions
  12772.  
  12773.    Before using this routine, you must use the fg_initw and fg_setworld
  12774.    routines to establish a world space coordinate system.  This routine is not
  12775.    available in Fastgraph/Light and has no effect in text video modes.
  12776.  
  12777. See also
  12778.  
  12779.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12780.    fg_swchar, fg_swtext
  12781.  
  12782. Examples
  12783.  
  12784.    7-13
  12785.  
  12786.  
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.                                      212
  12803. fg_swtext
  12804.  
  12805. Prototype
  12806.  
  12807.    void fg_swtext (char *string, int n, int justify);
  12808.    sub FGswtext (string$, n%, justify%)
  12809.    subroutine fg_swtext (c*(*) string, i*2 n, i*2 justify)
  12810.    procedure fg_swtext (string : string; n, justify : integer);
  12811.  
  12812. Description
  12813.  
  12814.    The fg_swtext routine is a scaled down version of the fg_swchar routine.
  12815.    It does not include the alternate font character definitions and thus
  12816.    requires less memory than fg_swchar.
  12817.  
  12818. Parameters
  12819.  
  12820.    string is the arbitrary-length sequence of characters to display.  It may
  12821.    contain special operators, as summarized in the following table.
  12822.  
  12823.                 operator      meaning
  12824.  
  12825.                    \^         superscript the next character
  12826.                    \v         subscript the next character
  12827.                     _         begin underlining characters until another
  12828.                               underscore character is encountered
  12829.  
  12830.    n is the number of characters in string, including any special operator
  12831.    characters.
  12832.  
  12833.    justify determines how string is positioned relative to the current
  12834.    position.  If justify is negative, string is left justified; if it is zero,
  12835.    string is centered; if it is positive, string is right justified.
  12836.  
  12837. Return value
  12838.  
  12839.    none
  12840.  
  12841. Restrictions
  12842.  
  12843.    Before using this routine, you must use the fg_initw and fg_setworld
  12844.    routines to establish a world space coordinate system.  This routine is not
  12845.    available in Fastgraph/Light and has no effect in text video modes.
  12846.  
  12847. See also
  12848.  
  12849.    fg_initw, fg_setangle, fg_setratio, fg_setsize, fg_setsizew, fg_setworld,
  12850.    fg_swchar, fg_swlength
  12851.  
  12852. Examples
  12853.  
  12854.    7-12, 7-13
  12855.  
  12856.  
  12857.  
  12858.  
  12859.  
  12860.  
  12861.                                      213
  12862. fg_tcdefine
  12863.  
  12864. Prototype
  12865.  
  12866.    void fg_tcdefine (int index, int attribute);
  12867.    sub FGtcdefine (index%, attribute%)
  12868.    subroutine fg_tcdefine (i*2 index, i*2 attribute)
  12869.    procedure fg_tcdefine (index, attribute : integer);
  12870.  
  12871. Description
  12872.  
  12873.    The fg_tcdefine routine defines the transparency attribute of a color index
  12874.    for use with the fg_tcxfer routine.
  12875.  
  12876. Parameters
  12877.  
  12878.    index is the color index being defined (between 0 and 255).
  12879.  
  12880.    attribute is the transparency attribute for the color index.  If the
  12881.    attribute is 0, the specified color will be opaque (non-transparent).  If
  12882.    it is any other value, fg_tcxfer will treat the color as transparent.
  12883.  
  12884. Return value
  12885.  
  12886.    none
  12887.  
  12888. Restrictions
  12889.  
  12890.    This routine has no effect in text video modes.
  12891.  
  12892. See also
  12893.  
  12894.    fg_tcmask, fg_tcxfer
  12895.  
  12896.  
  12897.  
  12898.  
  12899.  
  12900.  
  12901.  
  12902.  
  12903.  
  12904.  
  12905.  
  12906.  
  12907.  
  12908.  
  12909.  
  12910.  
  12911.  
  12912.  
  12913.  
  12914.  
  12915.  
  12916.  
  12917.  
  12918.  
  12919.  
  12920.                                      214
  12921. fg_tcmask
  12922.  
  12923. Prototype
  12924.  
  12925.    void fg_tcmask (int mask);
  12926.    sub FGtcmask (mask%)
  12927.    subroutine fg_tcmask (i*2 mask)
  12928.    procedure fg_tcmask (mask : integer);
  12929.  
  12930. Description
  12931.  
  12932.    The fg_tcmask routine defines which of the first 16 color values the
  12933.    fg_tcxfer routine will consider transparent.  Use the fg_tcdefine routine
  12934.    to control the transparency of colors 17 to 255 in the 256-color graphics
  12935.    modes.
  12936.  
  12937. Parameters
  12938.  
  12939.    mask is a 16-bit mask, where each bit indicates whether or not the
  12940.    corresponding color value is transparent.  For example, if bit 0 (the
  12941.    rightmost bit) is 1, then color 0 will be transparent.  If bit 0 is 0,
  12942.    color 0 will not be transparent.
  12943.  
  12944. Return value
  12945.  
  12946.    none
  12947.  
  12948. Restrictions
  12949.  
  12950.    This routine has no effect in text video modes.
  12951.  
  12952. See also
  12953.  
  12954.    fg_tcdefine, fg_tcxfer
  12955.  
  12956. Examples
  12957.  
  12958.    11-7
  12959.  
  12960.  
  12961.  
  12962.  
  12963.  
  12964.  
  12965.  
  12966.  
  12967.  
  12968.  
  12969.  
  12970.  
  12971.  
  12972.  
  12973.  
  12974.  
  12975.  
  12976.  
  12977.  
  12978.  
  12979.                                      215
  12980. fg_tcxfer
  12981.  
  12982. Prototype
  12983.  
  12984.    void fg_tcxfer (int minx, int maxx, int miny, int maxy, int newx, int newy,
  12985.      int source_page, int dest_page);
  12986.    sub FGtcxfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  12987.      dest_page%)
  12988.    subroutine fg_tcxfer (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 newx,
  12989.      i*2 newy, i*2 source_page, i*2 dest_page);
  12990.    procedure fg_tcxfer (minx, maxx, miny, maxy, newx, newy, source_page,
  12991.      dest_page : integer);
  12992.  
  12993. Description
  12994.  
  12995.    The fg_tcxfer routine copies a rectangular region from any position on any
  12996.    video page to any position on any video page, excluding any pixels whose
  12997.    color is transparent.  The transparent colors are defined by the fg_tcmask
  12998.    routine.
  12999.  
  13000. Parameters
  13001.  
  13002.    minx is the x coordinate of the source region's left edge.  Its value is
  13003.    reduced to a byte boundary if necessary.
  13004.  
  13005.    maxx is the x coordinate of the source region's right edge.  It must be
  13006.    greater than or equal to the value of minx.  Its value is extended to a
  13007.    byte boundary if necessary.
  13008.  
  13009.    miny is the y coordinate of the source region's top edge.
  13010.  
  13011.    maxy is the y coordinate of the source region's bottom edge.  It must be
  13012.    greater than or equal to the value of miny.
  13013.  
  13014.    newx is the x coordinate of the destination region's left edge.  Its value
  13015.    is reduced to a byte boundary if necessary.
  13016.  
  13017.    newy is the y coordinate of the destination region's bottom edge.
  13018.  
  13019.    source_page is the video page number containing the source region.
  13020.  
  13021.    dest_page is the video page number for the destination region.
  13022.  
  13023. Return value
  13024.  
  13025.    none
  13026.  
  13027. Restrictions
  13028.  
  13029.    If source_page and dest_page reference the same video page, the source
  13030.    region and destination region must not overlap.  This routine has no effect
  13031.    in text video modes.
  13032.  
  13033. See also
  13034.  
  13035.    fg_tcdefine, fg_tcmask, fg_transfer
  13036.  
  13037.  
  13038.                                      216
  13039. fg_tcxfer (continued)
  13040.  
  13041. Examples
  13042.  
  13043.    11-7
  13044.  
  13045.  
  13046.  
  13047.  
  13048.  
  13049.  
  13050.  
  13051.  
  13052.  
  13053.  
  13054.  
  13055.  
  13056.  
  13057.  
  13058.  
  13059.  
  13060.  
  13061.  
  13062.  
  13063.  
  13064.  
  13065.  
  13066.  
  13067.  
  13068.  
  13069.  
  13070.  
  13071.  
  13072.  
  13073.  
  13074.  
  13075.  
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.  
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.  
  13096.  
  13097.                                      217
  13098. fg_testmode
  13099.  
  13100. Prototype
  13101.  
  13102.    int fg_testmode (int mode, int pages);
  13103.    function FGtestmode% (mode%, pages%)
  13104.    i*2 function fg_testmode (i*2 mode, i*2 pages)
  13105.    function fg_testmode (mode, pages : integer) : integer;
  13106.  
  13107. Description
  13108.  
  13109.    The fg_testmode routine determines whether or not a specified video mode is
  13110.    available on the user's system.  Additionally, fg_testmode can check if
  13111.    there is enough video memory (for physical pages) or random-access memory
  13112.    (for virtual pages) to support the number of video pages needed.
  13113.  
  13114. Parameters
  13115.  
  13116.    mode is the video mode number to test, between 0 and 29.  Refer to the
  13117.    description of the fg_setmode routine for a list of available video modes.
  13118.  
  13119.    pages is the number of video pages required (either physical pages, virtual
  13120.    pages, or both).  If the pages parameter is zero or negative, fg_testmode
  13121.    checks for availability of the video mode but does not consider video
  13122.    memory requirements.
  13123.  
  13124. Return value
  13125.  
  13126.    If the requested video mode is available (with the requested number of
  13127.    video pages), fg_testmode returns 1.  If not, it returns 0.
  13128.  
  13129. Restrictions
  13130.  
  13131.    SVGA graphics modes are available only after successfully initializing the
  13132.    SVGA kernel with fg_svgainit.
  13133.  
  13134. See also
  13135.  
  13136.    fg_automode, fg_bestmode, fg_setmode, fg_svgainit
  13137.  
  13138. Examples
  13139.  
  13140.    3-3, 3-5, 3-8, 3-10, 5-16, 6-7, 6-8
  13141.  
  13142.  
  13143.  
  13144.  
  13145.  
  13146.  
  13147.  
  13148.  
  13149.  
  13150.  
  13151.  
  13152.  
  13153.  
  13154.  
  13155.  
  13156.                                      218
  13157. fg_text
  13158.  
  13159. Prototype
  13160.  
  13161.    void fg_text (char *string, int n);
  13162.    sub FGtext (string$, n%)
  13163.    subroutine fg_text (c*(*) string, i*2 n)
  13164.    procedure fg_text (string : string; n : integer);
  13165.  
  13166. Description
  13167.  
  13168.    The fg_text routine displays a string of hardware characters, starting at
  13169.    the text cursor position, using the current text attribute (for text modes)
  13170.    or color index (for graphics modes).  This routine leaves the text cursor
  13171.    one column to the right of the last character changed (or the first column
  13172.    of the next row if the last character is at the end of a row).
  13173.  
  13174. Parameters
  13175.  
  13176.    string is the arbitrary-length sequence of characters to display.
  13177.  
  13178.    n is the number of characters to display from string.
  13179.  
  13180. Return value
  13181.  
  13182.    none
  13183.  
  13184. Restrictions
  13185.  
  13186.    none
  13187.  
  13188. See also
  13189.  
  13190.    fg_locate, fg_print, fg_setattr
  13191.  
  13192. Examples
  13193.  
  13194.    7-1, 7-2, 7-3, 7-4, 7-5, 7-7, 7-8, 7-9, 7-10
  13195.  
  13196.  
  13197.  
  13198.  
  13199.  
  13200.  
  13201.  
  13202.  
  13203.  
  13204.  
  13205.  
  13206.  
  13207.  
  13208.  
  13209.  
  13210.  
  13211.  
  13212.  
  13213.  
  13214.  
  13215.                                      219
  13216. fg_transfer
  13217.  
  13218. Prototype
  13219.  
  13220.    void fg_transfer (int minx, int maxx, int miny, int maxy, int newx,
  13221.      int newy, int source_page, int dest_page);
  13222.    sub FGtransfer (minx%, maxx%, miny%, maxy%, newx%, newy%, source_page%,
  13223.      dest_page%)
  13224.    subroutine fg_transfer (i*2 minx, i*2 maxx, i*2 miny, i*2 maxy, i*2 newx,
  13225.      i*2 newy, i*2 source_page, i*2 dest_page);
  13226.    procedure fg_transfer (minx, maxx, miny, maxy, newx, newy, source_page,
  13227.      dest_page : integer);
  13228.  
  13229. Description
  13230.  
  13231.    The fg_transfer routine copies a rectangular region from any position on
  13232.    any video page to any position on any video page.  In text modes, the
  13233.    region is defined in character space; in graphics modes, it is defined in
  13234.    screen space.  It is Fastgraph's most general image transfer routine.
  13235.  
  13236. Parameters
  13237.  
  13238.    minx is the x coordinate of the source region's left edge.  In graphics
  13239.    modes, its value is reduced to a byte boundary if necessary.
  13240.  
  13241.    maxx is the x coordinate of the source region's right edge.  It must be
  13242.    greater than or equal to the value of minx.  In graphics modes, its value
  13243.    is extended to a byte boundary if necessary.
  13244.  
  13245.    miny is the y coordinate of the source region's top edge.
  13246.  
  13247.    maxy is the y coordinate of the source region's bottom edge.  It must be
  13248.    greater than or equal to the value of miny.
  13249.  
  13250.    newx is the x coordinate of the destination region's left edge.  Its value
  13251.    is reduced to a byte boundary if necessary.
  13252.  
  13253.    newy is the y coordinate of the destination region's bottom edge.
  13254.  
  13255.    source_page is the video page number containing the source region.
  13256.  
  13257.    dest_page is the video page number for the destination region.
  13258.  
  13259. Return value
  13260.  
  13261.    none
  13262.  
  13263. Restrictions
  13264.  
  13265.    If source_page and dest_page reference the same video page, the source
  13266.    region and destination region must not overlap.
  13267.  
  13268. See also
  13269.  
  13270.    fg_copypage, fg_restore, fg_save, fg_tcxfer
  13271.  
  13272.  
  13273.  
  13274.                                      220
  13275. fg_transfer (continued)
  13276.  
  13277. Examples
  13278.  
  13279.    11-4, 11-5, 11-6, 12-4, 12-5, 12-6
  13280.  
  13281.  
  13282.  
  13283.  
  13284.  
  13285.  
  13286.  
  13287.  
  13288.  
  13289.  
  13290.  
  13291.  
  13292.  
  13293.  
  13294.  
  13295.  
  13296.  
  13297.  
  13298.  
  13299.  
  13300.  
  13301.  
  13302.  
  13303.  
  13304.  
  13305.  
  13306.  
  13307.  
  13308.  
  13309.  
  13310.  
  13311.  
  13312.  
  13313.  
  13314.  
  13315.  
  13316.  
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.  
  13325.  
  13326.  
  13327.  
  13328.  
  13329.  
  13330.  
  13331.  
  13332.  
  13333.                                      221
  13334. fg_version
  13335.  
  13336. Prototype
  13337.  
  13338.    void fg_version (int *major, int *minor);
  13339.    sub FGversion (major%, minor%)
  13340.    subroutine fg_version (i*2 major, i*2 minor)
  13341.    procedure fg_version (var major, minor : integer);
  13342.  
  13343. Description
  13344.  
  13345.    The fg_version routine returns the major and minor version numbers for your
  13346.    copy of Fastgraph or Fastgraph/Light.  For example, if you are using
  13347.    Fastgraph version 2.10, the major version number is 2 and the minor version
  13348.    number is 10.
  13349.  
  13350. Parameters
  13351.  
  13352.    major receives the major version number.
  13353.  
  13354.    minor receives the minor version number, expressed in hundredths.
  13355.  
  13356. Return value
  13357.  
  13358.    none
  13359.  
  13360. Restrictions
  13361.  
  13362.    none
  13363.  
  13364. See also
  13365.  
  13366.    fg_svgaver
  13367.  
  13368. Examples
  13369.  
  13370.    1-1
  13371.  
  13372.  
  13373.  
  13374.  
  13375.  
  13376.  
  13377.  
  13378.  
  13379.  
  13380.  
  13381.  
  13382.  
  13383.  
  13384.  
  13385.  
  13386.  
  13387.  
  13388.  
  13389.  
  13390.  
  13391.  
  13392.                                      222
  13393. fg_voice
  13394.  
  13395. Prototype
  13396.  
  13397.    void fg_voice (int channel, int frequency, int volume, int duration);
  13398.    sub FGvoice (channel%, frequency%, volume%, duration%)
  13399.    subroutine fg_voice (i*2 channel, i*2 frequency, i*2 volume, i*2 duration)
  13400.    procedure fg_voice (channel, frequency, volume, duration : integer);
  13401.  
  13402. Description
  13403.  
  13404.    The fg_voice routine produces a tone of a specified frequency, duration,
  13405.    and volume using one of the TI sound chip's four independent voice
  13406.    channels.
  13407.  
  13408. Parameters
  13409.  
  13410.    channel defines the voice channel or type of noise, as shown below.
  13411.  
  13412.                        value  meaning
  13413.  
  13414.                          1    voice channel #1
  13415.                          2    voice channel #2
  13416.                          3    voice channel #3
  13417.                          4    voice channel #4, periodic noise
  13418.                          5    voice channel #4, white noise
  13419.  
  13420.    frequency defines the tone's frequency in Hertz.  If channel is 1, 2, or 3,
  13421.    then frequency represents the actual frequency, between 18 and 32,767.  If
  13422.    channel is 4 or 5, frequency is instead a value that represents a specific
  13423.    frequency, as shown below.
  13424.  
  13425.                             value   frequency
  13426.  
  13427.                               0     512 Hertz
  13428.                               1    1024 Hertz
  13429.                               2    2048 Hertz
  13430.  
  13431.    volume is the tone's volume, between 0 (silent) and 15 (loudest).
  13432.  
  13433.    duration is the tone's length in clock ticks (there are approximately 18.2
  13434.    clock ticks per second).  If duration is zero or negative, the tone is said
  13435.    to be continuous and will play until you stop it with the fg_quiet routine.
  13436.  
  13437. Return value
  13438.  
  13439.    none
  13440.  
  13441. Restrictions
  13442.  
  13443.    This routine should only be used on systems equipped with the TI sound chip
  13444.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  13445.    asynchronous sound already in progress.
  13446.  
  13447. See also
  13448.  
  13449.    fg_music, fg_quiet, fg_sound, fg_voices
  13450.  
  13451.                                      223
  13452. fg_voice (continued)
  13453.  
  13454. Examples
  13455.  
  13456.    15-2
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.  
  13467.  
  13468.  
  13469.  
  13470.  
  13471.  
  13472.  
  13473.  
  13474.  
  13475.  
  13476.  
  13477.  
  13478.  
  13479.  
  13480.  
  13481.  
  13482.  
  13483.  
  13484.  
  13485.  
  13486.  
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.  
  13496.  
  13497.  
  13498.  
  13499.  
  13500.  
  13501.  
  13502.  
  13503.  
  13504.  
  13505.  
  13506.  
  13507.  
  13508.  
  13509.  
  13510.                                      224
  13511. fg_voices
  13512.  
  13513. Prototype
  13514.  
  13515.    void fg_voices (int *sound_array, int ntimes);
  13516.    sub FGvoices (sound_array%(), ntimes%)
  13517.    subroutine fg_voices (i*2 sound_array, i*2 ntimes)
  13518.    procedure fg_voices (var sound_array : integer; ntimes : integer);
  13519.  
  13520. Description
  13521.  
  13522.    The fg_voices routine uses the TI sound chip to play a series of tones of
  13523.    specified frequencies, durations, and volumes, concurrent with other
  13524.    activity.  It is the asynchronous version of the fg_voice routine.
  13525.  
  13526. Parameters
  13527.  
  13528.    sound_array is an arbitrary-length array containing a series of
  13529.    (channel,frequency,volume,duration) sound definitions.  The format of this
  13530.    array is:
  13531.  
  13532.  
  13533.                           [0]    channel # of sound 1
  13534.  
  13535.                           [1]    frequency of sound 1
  13536.  
  13537.                           [2]    volume    of sound 1
  13538.  
  13539.                           [3]    duration  of sound 1
  13540.                                           .
  13541.                                           .
  13542.                                           .
  13543.                                           .
  13544.                                           .
  13545.                        [4n-4]    channel # of sound n
  13546.  
  13547.                        [4n-3]    frequency of sound n
  13548.  
  13549.                        [4n-2]    volume    of sound n
  13550.  
  13551.                        [4n-1]    duration  of sound n
  13552.  
  13553.                          [4n]       terminator (0)
  13554.  
  13555.  
  13556.    The channel numbers, frequencies, volumes, and durations must be in the
  13557.    same ranges as discussed in the description of the fg_voice routine, except
  13558.    the durations are quadrupled because of the accelerated clock tick
  13559.    interrupt rate (there are 72.8 instead of 18.2 clock ticks per second).  A
  13560.    null character (that is, a zero byte) terminates the array.
  13561.  
  13562.    ntimes specifies the number of times to cycle through the sounds defined in
  13563.    sound_array.  If ntimes is negative, the sounds will play repetitively
  13564.    until stopped with the fg_hush or fg_hushnext routine.
  13565.  
  13566.  
  13567.  
  13568.  
  13569.                                      225
  13570. fg_voices (continued)
  13571.  
  13572. Return value
  13573.  
  13574.    none
  13575.  
  13576. Restrictions
  13577.  
  13578.    This routine should only be used on systems equipped with the TI sound chip
  13579.    (namely, the PCjr and Tandy 1000 systems).  It has no effect if there is
  13580.    asynchronous sound already in progress.  To expand the range of sound
  13581.    effects, Fastgraph temporarily quadruples the clock tick interrupt rate
  13582.    from 18.2 to 72.8 ticks per second while producing asynchronous sound.
  13583.    Because many disk controllers rely on the 18.2 tick per second clock rate
  13584.    to synchronize disk accesses, your programs should not perform any disk
  13585.    operations when asynchronous sound is in progress.
  13586.  
  13587. See also
  13588.  
  13589.    fg_hush, fg_hushnext, fg_musicb, fg_playing, fg_sounds, fg_voice
  13590.  
  13591. Examples
  13592.  
  13593.    15-5
  13594.  
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.  
  13603.  
  13604.  
  13605.  
  13606.  
  13607.  
  13608.  
  13609.  
  13610.  
  13611.  
  13612.  
  13613.  
  13614.  
  13615.  
  13616.  
  13617.  
  13618.  
  13619.  
  13620.  
  13621.  
  13622.  
  13623.  
  13624.  
  13625.  
  13626.  
  13627.  
  13628.                                      226
  13629. fg_waitfor
  13630.  
  13631. Prototype
  13632.  
  13633.    void fg_waitfor (int ticks);
  13634.    sub FGwaitfor (ticks%)
  13635.    subroutine fg_waitfor (i*2 ticks)
  13636.    procedure fg_waitfor (ticks : integer);
  13637.  
  13638. Description
  13639.  
  13640.    The fg_waitfor routine delays a program's execution for a given number of
  13641.    clock ticks.  There are 18.2 clock ticks per second, regardless of the
  13642.    system's processor speed.
  13643.  
  13644. Parameters
  13645.  
  13646.    ticks is the number of clock ticks to wait.
  13647.  
  13648. Return value
  13649.  
  13650.    none
  13651.  
  13652. Restrictions
  13653.  
  13654.    none
  13655.  
  13656. See also
  13657.  
  13658.    fg_stall
  13659.  
  13660. Examples
  13661.  
  13662.    5-11, 5-12, 12-1 to 12-6, 13-5, 13-6, 14-2, 14-5, 14-7, 14-8, 14-12, 14-13,
  13663.    15-1, 15-2, 15-3, 15-6, 15-7, 16-1
  13664.  
  13665.  
  13666.  
  13667.  
  13668.  
  13669.  
  13670.  
  13671.  
  13672.  
  13673.  
  13674.  
  13675.  
  13676.  
  13677.  
  13678.  
  13679.  
  13680.  
  13681.  
  13682.  
  13683.  
  13684.  
  13685.  
  13686.  
  13687.                                      227
  13688. fg_waitkey
  13689.  
  13690. Prototype
  13691.  
  13692.    void fg_waitkey (void);
  13693.    sub FGwaitkey ()
  13694.    subroutine fg_waitkey ()
  13695.    procedure fg_waitkey;
  13696.  
  13697. Description
  13698.  
  13699.    The fg_waitkey routine flushes the BIOS keyboard buffer (that is, removes
  13700.    any type-ahead characters) and then waits for another keystroke.  It is
  13701.    most useful in "press any key to continue" situations.
  13702.  
  13703. Parameters
  13704.  
  13705.    none
  13706.  
  13707. Return value
  13708.  
  13709.    none
  13710.  
  13711. Restrictions
  13712.  
  13713.    none
  13714.  
  13715. See also
  13716.  
  13717.    fg_getkey, fg_intkey
  13718.  
  13719. Examples
  13720.  
  13721.    3-2 to 3-8, 3-10
  13722.  
  13723.  
  13724.  
  13725.  
  13726.  
  13727.  
  13728.  
  13729.  
  13730.  
  13731.  
  13732.  
  13733.  
  13734.  
  13735.  
  13736.  
  13737.  
  13738.  
  13739.  
  13740.  
  13741.  
  13742.  
  13743.  
  13744.  
  13745.  
  13746.                                      228
  13747. fg_waitvr
  13748.  
  13749. Prototype
  13750.  
  13751.    void fg_waitvr (int state);
  13752.    sub FGwaitvr (state%)
  13753.    subroutine fg_waitvr (i*2 state)
  13754.    procedure fg_waitvr (state : integer);
  13755.  
  13756. Description
  13757.  
  13758.    The fg_waitvr routine disables or enables Fastgraph's internal vertical
  13759.    retrace waiting (it is enabled by default).  When it is disabled, Fastgraph
  13760.    assumes your application will control the retrace synchronization as
  13761.    needed.  Vertical retrace waiting applies to the Fastgraph routines listed
  13762.    in the "see also" section below.
  13763.  
  13764. Parameters
  13765.  
  13766.    state defines whether vertical retrace waiting is enabled or disabled.  If
  13767.    state is 0, vertical retrace waiting is disabled.  If it is 1, vertical
  13768.    retrace waiting is enabled.
  13769.  
  13770. Return value
  13771.  
  13772.    none
  13773.  
  13774. Restrictions
  13775.  
  13776.    none
  13777.  
  13778. See also
  13779.  
  13780.    fg_getdacs, fg_makegif, fg_makepcx, fg_palettes, fg_pan, fg_setdacs,
  13781.    fg_setvpage, fg_showgif, fg_showpcx
  13782.  
  13783.  
  13784.  
  13785.  
  13786.  
  13787.  
  13788.  
  13789.  
  13790.  
  13791.  
  13792.  
  13793.  
  13794.  
  13795.  
  13796.  
  13797.  
  13798.  
  13799.  
  13800.  
  13801.  
  13802.  
  13803.  
  13804.  
  13805.                                      229
  13806. fg_where
  13807.  
  13808. Prototype
  13809.  
  13810.    void fg_where (int *row, int *column);
  13811.    sub FGwhere (row%, column%)
  13812.    subroutine fg_where (i*2 row, i*2 column)
  13813.    procedure fg_where (row, column : integer);
  13814.  
  13815. Description
  13816.  
  13817.    The fg_where routine retrieves the text cursor position for the active
  13818.    display page.
  13819.  
  13820. Parameters
  13821.  
  13822.    row receives the text cursor's current row number, between 0 and one less
  13823.    than the number of character rows available.
  13824.  
  13825.    column receives text cursor's current column number, between 0 and one less
  13826.    than the number of character columns available.
  13827.  
  13828. Return value
  13829.  
  13830.    none
  13831.  
  13832. Restrictions
  13833.  
  13834.    none
  13835.  
  13836. See also
  13837.  
  13838.    fg_locate
  13839.  
  13840. Examples
  13841.  
  13842.    7-2
  13843.  
  13844.  
  13845.  
  13846.  
  13847.  
  13848.  
  13849.  
  13850.  
  13851.  
  13852.  
  13853.  
  13854.  
  13855.  
  13856.  
  13857.  
  13858.  
  13859.  
  13860.  
  13861.  
  13862.  
  13863.  
  13864.                                      230
  13865. fg_xalpha
  13866.  
  13867. Prototype
  13868.  
  13869.    int fg_xalpha (int ix);
  13870.    function FGxalpha% (ix%)
  13871.    i*2 function fg_xalpha (i*2 ix)
  13872.    function fg_xalpha (ix : integer) : integer;
  13873.  
  13874. Description
  13875.  
  13876.    The fg_xalpha routine translates a screen space x coordinate to the
  13877.    character space column containing that coordinate.
  13878.  
  13879. Parameters
  13880.  
  13881.    ix is the screen space coordinate to translate.
  13882.  
  13883. Return value
  13884.  
  13885.    The character space column containing the screen space coordinate ix.  In
  13886.    text modes, the return value is equal to the value of ix.
  13887.  
  13888. Restrictions
  13889.  
  13890.    none
  13891.  
  13892. See also
  13893.  
  13894.    fg_xconvert, fg_yalpha, fg_yconvert
  13895.  
  13896. Examples
  13897.  
  13898.    14-10
  13899.  
  13900.  
  13901.  
  13902.  
  13903.  
  13904.  
  13905.  
  13906.  
  13907.  
  13908.  
  13909.  
  13910.  
  13911.  
  13912.  
  13913.  
  13914.  
  13915.  
  13916.  
  13917.  
  13918.  
  13919.  
  13920.  
  13921.  
  13922.  
  13923.                                      231
  13924. fg_xconvert
  13925.  
  13926. Prototype
  13927.  
  13928.    int fg_xconvert (int column);
  13929.    function FGxconvert% (column%)
  13930.    i*2 function fg_xconvert (i*2 column)
  13931.    function fg_xconvert (column : integer) : integer;
  13932.  
  13933. Description
  13934.  
  13935.    The fg_xconvert routine translates a character space column to the screen
  13936.    space coordinate of its leftmost pixel.  In graphics video modes,
  13937.    fg_xconvert(1) is an easy way to determine the width in pixels of a
  13938.    character cell.
  13939.  
  13940. Parameters
  13941.  
  13942.    column is the character space column to translate.
  13943.  
  13944. Return value
  13945.  
  13946.    The screen space x coordinate of the leftmost pixel in the character space
  13947.    column column.  In text modes, the return value is equal to the value of
  13948.    column.
  13949.  
  13950. Restrictions
  13951.  
  13952.    none
  13953.  
  13954. See also
  13955.  
  13956.    fg_xalpha, fg_yalpha, fg_yconvert
  13957.  
  13958. Examples
  13959.  
  13960.    7-9, 14-8
  13961.  
  13962.  
  13963.  
  13964.  
  13965.  
  13966.  
  13967.  
  13968.  
  13969.  
  13970.  
  13971.  
  13972.  
  13973.  
  13974.  
  13975.  
  13976.  
  13977.  
  13978.  
  13979.  
  13980.  
  13981.  
  13982.                                      232
  13983. fg_xscreen
  13984.  
  13985. Prototype
  13986.  
  13987.    int fg_xscreen (double x);
  13988.    function FGxscreen% (x#)
  13989.    i*2 function fg_xscreen (r*8 x)
  13990.    function fg_xscreen (x : real) : integer;
  13991.  
  13992. Description
  13993.  
  13994.    The fg_xscreen routine translates a world space x coordinate to its screen
  13995.    space equivalent.
  13996.  
  13997. Parameters
  13998.  
  13999.    x is the world space coordinate to translate.
  14000.  
  14001. Return value
  14002.  
  14003.    The screen space x coordinate equivalent to the world space coordinate x.
  14004.  
  14005. Restrictions
  14006.  
  14007.    This routine is not available in Fastgraph/Light.
  14008.  
  14009. See also
  14010.  
  14011.    fg_xworld, fg_yscreen, fg_yworld
  14012.  
  14013.  
  14014.  
  14015.  
  14016.  
  14017.  
  14018.  
  14019.  
  14020.  
  14021.  
  14022.  
  14023.  
  14024.  
  14025.  
  14026.  
  14027.  
  14028.  
  14029.  
  14030.  
  14031.  
  14032.  
  14033.  
  14034.  
  14035.  
  14036.  
  14037.  
  14038.  
  14039.  
  14040.  
  14041.                                      233
  14042. fg_xworld
  14043.  
  14044. Prototype
  14045.  
  14046.    double fg_xworld (int ix);
  14047.    function FGxworld# (ix%)
  14048.    r*8 function fg_xworld (i*2 ix)
  14049.    function fg_xworld (ix : integer) : real;
  14050.  
  14051. Description
  14052.  
  14053.    The fg_xworld routine translates a screen space x coordinate to its world
  14054.    space equivalent.
  14055.  
  14056. Parameters
  14057.  
  14058.    ix is the screen space coordinate to translate.
  14059.  
  14060. Return value
  14061.  
  14062.    The world space x coordinate equivalent to the screen space coordinate ix.
  14063.  
  14064. Restrictions
  14065.  
  14066.    This routine is not available in Fastgraph/Light.
  14067.  
  14068. See also
  14069.  
  14070.    fg_xscreen, fg_yscreen, fg_yworld
  14071.  
  14072.  
  14073.  
  14074.  
  14075.  
  14076.  
  14077.  
  14078.  
  14079.  
  14080.  
  14081.  
  14082.  
  14083.  
  14084.  
  14085.  
  14086.  
  14087.  
  14088.  
  14089.  
  14090.  
  14091.  
  14092.  
  14093.  
  14094.  
  14095.  
  14096.  
  14097.  
  14098.  
  14099.  
  14100.                                      234
  14101. fg_yalpha
  14102.  
  14103. Prototype
  14104.  
  14105.    int fg_yalpha (int iy);
  14106.    function FGyalpha% (iy%)
  14107.    i*2 function fg_yalpha (i*2 iy)
  14108.    function fg_yalpha (iy : integer) : integer;
  14109.  
  14110. Description
  14111.  
  14112.    The fg_yalpha routine translates a screen space y coordinate to the
  14113.    character space row containing that coordinate.
  14114.  
  14115. Parameters
  14116.  
  14117.    iy is the screen space coordinate to translate.
  14118.  
  14119. Return value
  14120.  
  14121.    The character space row containing the screen space coordinate iy.  In text
  14122.    modes, the return value is equal to the value of iy.
  14123.  
  14124. Restrictions
  14125.  
  14126.    none
  14127.  
  14128. See also
  14129.  
  14130.    fg_xalpha, fg_xconvert, fg_yconvert
  14131.  
  14132. Examples
  14133.  
  14134.    14-10
  14135.  
  14136.  
  14137.  
  14138.  
  14139.  
  14140.  
  14141.  
  14142.  
  14143.  
  14144.  
  14145.  
  14146.  
  14147.  
  14148.  
  14149.  
  14150.  
  14151.  
  14152.  
  14153.  
  14154.  
  14155.  
  14156.  
  14157.  
  14158.  
  14159.                                      235
  14160. fg_yconvert
  14161.  
  14162. Prototype
  14163.  
  14164.    int fg_yconvert (int row);
  14165.    function FGyconvert% (row%)
  14166.    i*2 function fg_yconvert (i*2 row)
  14167.    function fg_yconvert (row : integer) : integer;
  14168.  
  14169. Description
  14170.  
  14171.    The fg_yconvert routine translates a character space row to the screen
  14172.    space coordinate of its top (lowest-numbered) pixel.  In graphics video
  14173.    modes, fg_yconvert(1) is an easy way to determine the height in pixels of a
  14174.    character cell.
  14175.  
  14176. Parameters
  14177.  
  14178.    row is the character space row to translate.
  14179.  
  14180. Return value
  14181.  
  14182.    The screen space y coordinate of the top pixel in the character space row
  14183.    row.  In text modes, the return value is equal to the value of row.
  14184.  
  14185. Restrictions
  14186.  
  14187.    none
  14188.  
  14189. See also
  14190.  
  14191.    fg_xalpha, fg_xconvert, fg_yalpha
  14192.  
  14193. Examples
  14194.  
  14195.    7-9, 14-8
  14196.  
  14197.  
  14198.  
  14199.  
  14200.  
  14201.  
  14202.  
  14203.  
  14204.  
  14205.  
  14206.  
  14207.  
  14208.  
  14209.  
  14210.  
  14211.  
  14212.  
  14213.  
  14214.  
  14215.  
  14216.  
  14217.  
  14218.                                      236
  14219. fg_yscreen
  14220.  
  14221. Prototype
  14222.  
  14223.    int fg_yscreen (double y);
  14224.    function FGyscreen% (y#)
  14225.    i*2 function fg_yscreen (r*8 y)
  14226.    function fg_yscreen (y : real) : integer;
  14227.  
  14228. Description
  14229.  
  14230.    The fg_yscreen routine translates a world space y coordinate to its screen
  14231.    space equivalent.
  14232.  
  14233. Parameters
  14234.  
  14235.    y is the world space coordinate to translate.
  14236.  
  14237. Return value
  14238.  
  14239.    The screen space y coordinate equivalent to the world space coordinate y.
  14240.  
  14241. Restrictions
  14242.  
  14243.    This routine is not available in Fastgraph/Light.
  14244.  
  14245. See also
  14246.  
  14247.    fg_xscreen, fg_xworld, fg_yworld
  14248.  
  14249.  
  14250.  
  14251.  
  14252.  
  14253.  
  14254.  
  14255.  
  14256.  
  14257.  
  14258.  
  14259.  
  14260.  
  14261.  
  14262.  
  14263.  
  14264.  
  14265.  
  14266.  
  14267.  
  14268.  
  14269.  
  14270.  
  14271.  
  14272.  
  14273.  
  14274.  
  14275.  
  14276.  
  14277.                                      237
  14278. fg_yworld
  14279.  
  14280. Prototype
  14281.  
  14282.    double fg_yworld (int iy);
  14283.    function FGyworld# (iy%)
  14284.    r*8 function fg_yworld (i*2 iy)
  14285.    function fg_yworld (iy : integer) : real;
  14286.  
  14287. Description
  14288.  
  14289.    The fg_yworld routine translates a screen space y coordinate to its world
  14290.    space equivalent.
  14291.  
  14292. Parameters
  14293.  
  14294.    iy is the screen space coordinate to translate.
  14295.  
  14296. Return value
  14297.  
  14298.    The world space y coordinate equivalent to the screen space coordinate iy.
  14299.  
  14300. Restrictions
  14301.  
  14302.    This routine is not available in Fastgraph/Light.
  14303.  
  14304. See also
  14305.  
  14306.    fg_xscreen, fg_xworld, fg_yscreen
  14307.  
  14308.  
  14309.  
  14310.  
  14311.  
  14312.  
  14313.  
  14314.  
  14315.  
  14316.  
  14317.  
  14318.  
  14319.  
  14320.  
  14321.  
  14322.  
  14323.  
  14324.  
  14325.  
  14326.  
  14327.  
  14328.  
  14329.  
  14330.  
  14331.  
  14332.  
  14333.  
  14334.  
  14335.  
  14336.                                      238
  14337.